Removed struct keyword

This commit is contained in:
2025-04-04 13:32:55 +02:00
parent 9302eaef2f
commit 863fb7de5a
18 changed files with 44 additions and 40 deletions

View File

@ -1 +0,0 @@
struct{}

View File

@ -1,4 +1,4 @@
struct A {}
A {}
main() {
a := new(A)

View File

@ -17,12 +17,11 @@ var errs = []struct {
{"EmptySwitch.q", errors.EmptySwitch},
{"ExpectedDLLName.q", errors.ExpectedDLLName},
{"ExpectedFunctionDefinition.q", errors.ExpectedFunctionDefinition},
{"ExpectedFunctionParameters.q", errors.ExpectedFunctionParameters},
{"ExpectedIfBeforeElse.q", errors.ExpectedIfBeforeElse},
{"ExpectedIfBeforeElse2.q", errors.ExpectedIfBeforeElse},
{"ExpectedStructName.q", errors.ExpectedStructName},
{"ExpectedPackageName.q", errors.ExpectedPackageName},
{"InvalidCondition.q", errors.InvalidCondition},
{"InvalidDefinition.q", errors.InvalidDefinition},
{"InvalidInstructionCall.q", &errors.InvalidInstruction{Instruction: "sys.write"}},
{"InvalidInstructionExpression.q", &errors.InvalidInstruction{Instruction: "2+3"}},
{"InvalidInstructionIdentifier.q", &errors.InvalidInstruction{Instruction: "abc"}},

View File

@ -24,12 +24,12 @@ main() {
assert b.y == 4
}
struct Allocator {
Allocator {
block *any
current int
}
struct Point {
Point {
x int
y int
}

View File

@ -1,6 +1,6 @@
import sys
struct Struct {
Struct {
func *any
}

View File

@ -3,6 +3,6 @@ main() {
c.value += 16
}
struct Counter {
Counter {
value int
}

View File

@ -1,4 +1,4 @@
struct Point {
Point {
x int
y int
}