You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While I cannot directly tell you why comments lead to an evaluation error for you, I can at least offer some general comments. (In any case, nice work!)
In your interpreter settings, you could try to set allowCommentToken to false: While this shouldn't actually change anything relevant, I don't really see why you would need the CommentTokens, either (they're useful for syntax highlighting, if you want to use SOSML for that as well, though. SOSML-frontend does something like that, feel free to check out https://github.com/SOSML/SOSML-frontend/blob/master/frontend/src/sml.js, in case you're interested). (On a similar note, you should probably set strictMode to true and allowSuccessorML to false, or at least make them configurable; these flags enable features that do not fully conform to the SML standard.)
Further, it would be better to pass the interpreter settings also to getFirstState, otherwise that function uses the default settings.
I started off based on the code in the SOSML cli and experimented from there. I followed your suggestions, and the comments are now no longer causing evaluation errors. Unfortunately, the extension I depend on for syntax highlighting and formatting does crash vscode when it encounters a comment during formatting, but that's not a high enough concern for me currently.
So anyway, as of release of 1.1.0 this should be fixed :)
This should be easily remedied with the interpreterOptions, I think.
The text was updated successfully, but these errors were encountered: