Skip to content

Accept comma-separated function table declarations #100

@ghost

Description

This issue mimics #63 for function table declarations. The production is given in section 5.6 of the specification as follows:

var x:Identifier = [ f0:Identifier (, f:Identifier) ... ] ;

(I've added parentheses in the metalanguage, on the assumption that the postfix ellipsis notation used throughout the specification denotes the operand's Kleene closure.)

However, OdinMonkey's validator accepts comma-separated function table declarations of the form:

var x0:Identifier = [ f0:Identifier (, f0:Identifier) ... ] (, x1:Identifier = [ f1:Identifier (, f1:Identifier) ... ]) ... ;

Consider, for example, the following valid module:

(function() {
    "use asm"
    function f() {}
    function g() {}
    var x = [f], y = [g], z = [f, g]
    return f
})

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions