rescript-compiler icon indicating copy to clipboard operation
rescript-compiler copied to clipboard

Improve syntax error for unicode symbols that don't fit on one character.

Open cristianoc opened this issue 2 years ago • 0 comments

E.g. let c = '❤️' gives

FAILED: src/DocComments.ast

  Syntax error!
  /Users/cristianocalcagno/GitHub/rescript-vscode/analysis/tests/src/DocComments.res:1:8-9

  1 │ let c = '❤️'
  2 │ 

  This let-binding misses an expression


  Syntax error!
  /Users/cristianocalcagno/GitHub/rescript-vscode/analysis/tests/src/DocComments.res:1:10

  1 │ let c = '???️'
  2 │ 

  Not sure what to do with this character.


  Syntax error!
  /Users/cristianocalcagno/GitHub/rescript-vscode/analysis/tests/src/DocComments.res:1:11

  1 │ let c = '???️'
  2 │ 

  Not sure what to do with this character.


  Syntax error!
  /Users/cristianocalcagno/GitHub/rescript-vscode/analysis/tests/src/DocComments.res:1:12

  1 │ let c = '??️'
  2 │ 

  Not sure what to do with this character.


  Syntax error!
  /Users/cristianocalcagno/GitHub/rescript-vscode/analysis/tests/src/DocComments.res:1:13

  1 │ let c = '❤???'
  2 │ 

  Not sure what to do with this character.


  Syntax error!
  /Users/cristianocalcagno/GitHub/rescript-vscode/analysis/tests/src/DocComments.res:1:14

  1 │ let c = '❤???'
  2 │ 

  Not sure what to do with this character.


  Syntax error!
  /Users/cristianocalcagno/GitHub/rescript-vscode/analysis/tests/src/DocComments.res:1:15

  1 │ let c = '❤??'
  2 │ 

  Not sure what to do with this character.

cristianoc avatar Aug 24 '22 03:08 cristianoc