Improved error message for invalid instructions
This commit is contained in:
5
tests/errors/InvalidInstructionCall.q
Normal file
5
tests/errors/InvalidInstructionCall.q
Normal file
@ -0,0 +1,5 @@
|
||||
import sys
|
||||
|
||||
main() {
|
||||
sys.write
|
||||
}
|
@ -22,7 +22,8 @@ var errs = []struct {
|
||||
{"ExpectedIfBeforeElse2.q", errors.ExpectedIfBeforeElse},
|
||||
{"ExpectedStructName.q", errors.ExpectedStructName},
|
||||
{"ExpectedPackageName.q", errors.ExpectedPackageName},
|
||||
{"InvalidInstructionExpression.q", &errors.InvalidInstruction{Instruction: "+"}},
|
||||
{"InvalidInstructionCall.q", &errors.InvalidInstruction{Instruction: "sys.write"}},
|
||||
{"InvalidInstructionExpression.q", &errors.InvalidInstruction{Instruction: "2+3"}},
|
||||
{"InvalidInstructionIdentifier.q", &errors.InvalidInstruction{Instruction: "abc"}},
|
||||
{"InvalidInstructionNumber.q", &errors.InvalidInstruction{Instruction: "123"}},
|
||||
{"InvalidInstructionString.q", &errors.InvalidInstruction{Instruction: "\"Hello\""}},
|
||||
|
Reference in New Issue
Block a user