crystal-community / icr

Interactive console for Crystal programming language
MIT License
505 stars 40 forks source link

Syntax error with `true.!` expression #117

Closed Sija closed 4 years ago

Sija commented 4 years ago

true.! expression fails to compile with following error:

expecting any of these tokens: IDENT, CONST, +, -, *, /, //, %, |, &, ^, ~, **, <<, <, <=, ==, !=, =~, !~, >>, >, >=, <=>, ===, [], []=, []?, [, &+, &-, &*, &** (not '!')

Previous issue: https://github.com/crystal-lang/crystal/issues/8765

veelenga commented 4 years ago

ICR embeds Crystal::Parser as part of the binary. You need to re-compile the binary to let it work:

$ icr
icr(0.32.0) > false.!
expecting any of these tokens: IDENT, CONST, +, -, *, /, //, %, |, &, ^, ~, **, <<, <, <=, ==, !=, =~, !~, >>, >, >=, <=>, ===, [], []=, []?, [, &+, &-, &*, &** (not '!')

$ make clean && make && make install
$ icr                                                                                                                                                                                                                                 
icr(0.32.0) > false.!
 => true