Compiler: Don't allow string as symbol so it doesn't restrict characters #207
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In Replicode, here is a statement to print
"start: Inject fact"
:However, the compiler prints the confusing message "error: no variables allowed outside a pattern skeleton". This is because it treats
"start
as a symbol which is followed by:
and so it thinks it is a variable. The problem comes from symbol_expr which checks if a sequence of characters is a symbol.This pull request updates
symbol_expr
to exclude"
as a symbol character. Therefore the start of the string is not a symbol and not treated as a variable. Now the message is printed as expected.