Skip to content

Fail to reject unassigned global variable declaration #29

@bendrissou

Description

@bendrissou

When a program contains an uninitialized declaration of a global variable. The parser should reject it, as per the specification. However the parser accepts and prints the AST, without raising an error.

Example:

var

Output:

{
    "Chunk": {
        "body": {
            "Block": {
                "body": [
                    {
                        "Name": {
                            "id": "var",
                            "start_char": 0,
                            "stop_char": 2,
                            "line": 1
                        }
                    }
                ],
                "start_char": 0,
                "stop_char": 2,
                "line": 1
            }
        },
        "start_char": 0,
        "stop_char": 2,
        "line": 1
    }
}

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