Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify whether // in an s-expression is an operator or the beginning of a comment #72

Open
zslayton opened this issue Oct 1, 2021 · 0 comments

Comments

@zslayton
Copy link
Contributor

zslayton commented Oct 1, 2021

ion-java and ion-c both fail to parse this input:

(a // b)

I would expect this to be an s-expression with three symbols:

  • a (an identifier)
  • // (an operator)
  • c (an identifier)

From the spec's symbols section:

Within S-expressions, the rules for unquoted symbols include another set of tokens: operators. An operator is an unquoted sequence of one or more of the following nineteen ASCII characters: !#%&*+-./;<=>?@^`|~ Operators and identifiers can be juxtaposed without whitespace:

From the spec's symbol representations section:

Operator: an unquoted sequence of one or more of the following nineteen ASCII characters: !#%&*+-./;<=>?@^`|~ Operators can only be used as (direct) elements of an S-expression. In any other context those characters require single-quotes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant