Skip to content

vardecl with implicit type and initializer #7

@svstuff

Description

@svstuff

Vardecl with implicit type and initializer is difficult to separate from an assignment statement. The LRM grammar is ambiguous and would require some semantic predicate magic to disambiguate.

Rather than doing that I've just relaxed the grammar to allow interleaving declarations and statements and made certain variable declarations (of the form "a = b;") be treated as an assignment statement.

I'm sure this could be handled in the grammar if my antlr-fu was better, but for now it seems easier to handle this in the semantic phase.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions