Skip to content
This repository has been archived by the owner on May 1, 2021. It is now read-only.

Error if arguments exceed argument list #13

Open
Vorlias opened this issue Aug 21, 2020 · 0 comments
Open

Error if arguments exceed argument list #13

Vorlias opened this issue Aug 21, 2020 · 0 comments
Milestone

Comments

@Vorlias
Copy link
Member

Vorlias commented Aug 21, 2020

15:06:39.426 - ReplicatedStorage.TS.node_modules.cmd-ast.out.CommandAstParser:328: attempt to index nil with 'type'
15:06:39.427 - Stack Begin
15:06:39.428 - Script 'ReplicatedStorage.TS.node_modules.cmd-ast.out.CommandAstParser', Line 328 - function appendStatementNode
15:06:39.428 - Script 'ReplicatedStorage.TS.node_modules.cmd-ast.out.CommandAstParser', Line 757 - function Parse
testargs "hello" test

with definition:

 { command: "testargs", args: [{ type: ["string"] }] }

the argument "test" will cause the above error.

Fix possibilities:

  • Parser adds type error to exceeding argument list
  • Parser allows some way of declaring an argument as varadic (if it's the last one)
Vorlias added a commit that referenced this issue Aug 21, 2020
@Vorlias Vorlias closed this as completed Aug 21, 2020
@Vorlias Vorlias reopened this Aug 21, 2020
@Vorlias Vorlias added this to the 1.0.0-beta milestone Oct 12, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant