onelang / OneLang

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

OneLang test issues

koczkatamas opened this issue · comments

  • Python: else indentation breaks logic
  • Python: Tokenizer::offset is not initalized to 0 in __init__
  • Python: static method StringHelper::starts_with_at_index has self argument and no @staticmethod attribute
  • Swift: Tokenizer::init uses ! for setting operators field
  • Swift: Tokenizer::tokenize: fix empty array init (var result = [] -> var result = [Token]())
  • Swift: convert substrings to string (str[x ..< y] -> String(str[x ..< y]))
  • Swift: do not force unwrap operators at foreach (for curr_op in self.operators! -> for curr_op in self.operators)
  • Swift: static methods should be prefixed with class (func startsWithAtIndex -> class func startsWithAtIndex)
  • Swift: nullability fixes... (eg. return [Token]? instead of [Token] and force unwrap every nullable value on access)
  • Java: infer foreach item type (instead of Object)
  • Java: use equals instead of == for comparison between strings (StringHelper.startsWithAtIndex)
  • Ruby: create accessors for static fields
      class << self
        attr_accessor :identifier
      end
  • Ruby: fix infinite loop (comparison issue?)
  • C++: add ; after break
  • C++: prefix static methods with static (make StringHelper::startsWithAtIndex static)
  • C++: unify reference handling (make everything shared pointer? so sp<vector<sp<object>>>>???)
    • fix vector initialization
    • fix return value type
    • fix class field type
  • Go: replace OneArray with concrete type (eg. []string or []Token)
  • Go: use for instead of while
  • Go: fix static methods
  • Go: find out how to use array with custom class (eg. []*Token)
  • JavaScript: initialize variable (Tokenizer::constructor: this.offset = 0;)
  • JavaScript: use static prefix for static methods (StringHelper::startsWithAtIndex)
  • Perl: fix array initializer
  • Perl: fix infinite loop bug