reason
reason copied to clipboard
[refmt] parseRE throws an error when code contains line comment
The parseRE(code: string): astAndComments throws an error when the code contains one or more line comments.
The usage of the JS API is documented here.
const refmt = require('reason');
const ast = refmt.parseRE('let x = 1; // line comment');
Thrown: {
message: '2864: <syntax error>',
location: {
startLine: 1,
startLineStartChar: 12,
endLine: 1,
endLineEndChar: 13
}
}
The reason package version is ^3.3.4.