Implemented struct parser
This commit is contained in:
parent
00e7216256
commit
30940f0100
19 changed files with 388 additions and 252 deletions
1
tests/errors/ExpectedStructName.q
Normal file
1
tests/errors/ExpectedStructName.q
Normal file
|
@ -0,0 +1 @@
|
|||
struct{}
|
3
tests/errors/InvalidInstructionString.q
Normal file
3
tests/errors/InvalidInstructionString.q
Normal file
|
@ -0,0 +1,3 @@
|
|||
main() {
|
||||
"Hello"
|
||||
}
|
1
tests/errors/InvalidInstructionTopLevel3.q
Normal file
1
tests/errors/InvalidInstructionTopLevel3.q
Normal file
|
@ -0,0 +1 @@
|
|||
+
|
|
@ -16,14 +16,17 @@ var errs = []struct {
|
|||
}{
|
||||
{"EmptySwitch.q", errors.EmptySwitch},
|
||||
{"ExpectedFunctionDefinition.q", errors.ExpectedFunctionDefinition},
|
||||
{"ExpectedFunctionName.q", errors.ExpectedFunctionName},
|
||||
{"ExpectedFunctionName2.q", errors.ExpectedFunctionName},
|
||||
{"ExpectedFunctionParameters.q", errors.ExpectedFunctionParameters},
|
||||
{"ExpectedIfBeforeElse.q", errors.ExpectedIfBeforeElse},
|
||||
{"ExpectedIfBeforeElse2.q", errors.ExpectedIfBeforeElse},
|
||||
{"ExpectedStructName.q", errors.ExpectedStructName},
|
||||
{"InvalidInstructionExpression.q", &errors.InvalidInstruction{Instruction: "+"}},
|
||||
{"InvalidInstructionIdentifier.q", &errors.InvalidInstruction{Instruction: "abc"}},
|
||||
{"InvalidInstructionNumber.q", &errors.InvalidInstruction{Instruction: "123"}},
|
||||
{"InvalidInstructionExpression.q", &errors.InvalidInstruction{Instruction: "+"}},
|
||||
{"InvalidInstructionString.q", &errors.InvalidInstruction{Instruction: "\"Hello\""}},
|
||||
{"InvalidInstructionTopLevel.q", &errors.InvalidInstruction{Instruction: "123"}},
|
||||
{"InvalidInstructionTopLevel2.q", &errors.InvalidInstruction{Instruction: "\"Hello\""}},
|
||||
{"InvalidInstructionTopLevel3.q", &errors.InvalidInstruction{Instruction: "+"}},
|
||||
{"InvalidExpression.q", errors.InvalidExpression},
|
||||
{"InvalidCharacter.q", &errors.InvalidCharacter{Character: "@"}},
|
||||
{"InvalidCharacter2.q", &errors.InvalidCharacter{Character: "@"}},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue