Skip to content

Top-level groups cause generated node issue #37

@johnedquinn

Description

@johnedquinn

In below, since the root is expr, and since one of expr's variants, symbol, is a group, it cause the root to be a generated node. Causing issues, since we can't visit a generated node. Needs research. Likely in the AstConverter.

kanonic: {
  name: ion;
  root: expr;
  package: "io.johnedquinn.ion.generated";
};

COLON: ":";
PAREN_LEFT: "\(";
PAREN_RIGHT: "\)";
SYMBOL_QUOTED: "'((\')|[^'])*'";
SYMBOL: "[a-zA-Z]+";
NUMBER: "[0-9]+";
LITERAL_STRING: "\"((\")|[^\"])*\"";

expr
	: annotation? expr --> annotated_expr
	| NUMBER --> number
	| PAREN_LEFT expr+ PAREN_RIGHT --> sexp
	| ( SYMBOL | SYMBOL_QUOTED ) --> symbol
	| LITERAL_STRING --> string
	;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions