Skip to content

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

@cristianoc

Description

@cristianoc

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions