summaryrefslogtreecommitdiff
path: root/tests/block-test.tnsl
diff options
context:
space:
mode:
authorKyle Gunger <kgunger12@gmail.com>2021-10-29 20:06:51 -0400
committerKyle Gunger <kgunger12@gmail.com>2021-10-29 20:06:51 -0400
commit3395cd7dc356b61fe48ee9d755eef8a7b19ee9f1 (patch)
tree7ff4dcc5fc9e24021fd5d754a8a8ecd2df3a6df4 /tests/block-test.tnsl
parent8502bdd410c5a685a66a218fa97ddd2e7d207d30 (diff)
[AST] Statement parsing (incomplete)
Still need to figure out a check for a type followed by a value
Diffstat (limited to 'tests/block-test.tnsl')
-rw-r--r--tests/block-test.tnsl74
1 files changed, 38 insertions, 36 deletions
diff --git a/tests/block-test.tnsl b/tests/block-test.tnsl
index 6dde05f..c48d7de 100644
--- a/tests/block-test.tnsl
+++ b/tests/block-test.tnsl
@@ -1,47 +1,49 @@
/#
- Copyright 2020 Kyle Gunger
+ Copyright 2020 Kyle Gunger
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
- http://www.apache.org/licenses/LICENSE-2.0
+ http://www.apache.org/licenses/LICENSE-2.0
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
#/
-/;if (i==0)
- ;i = 2
-;/
-/: include
- "this"
- "that"
-:/
+/; main
+ ;int i = 0
-# ;; can be used as a quick block re-definition
+ /;if (i==0)
+ ;i = 2
+ ;/
-/;if (i==0)
- ;i = 2
-;;else
- ;i = 0
-;/
+ /: include
+ "this"
+ "that"
+ :/
-# Comment block switching
+ # ;; can be used as a quick block re-definition
-/; if (i == 2)
- ;i = 4
-;#
- Comment
-#; else
- ;i = 6
-;/
+ /;if (i==0)
+ ;i = 2
+ ;;else
+ ;i = 0
+ ;/
-/; main
+ # Comment block switching
+
+ /; if (i == 2)
+ ;i = 4
+ ;#
+ Comment
+ #; else
+ ;i = 6
+ ;/
;/
/; module vec
@@ -51,17 +53,17 @@
/;method Vector2
/; operator + (~Vector2 v)
- ;self.x += `v.x
- ;self.y += `v.y
+ ;self.x += v`.x
+ ;self.y += v`.y
;/
- /; operator + (int32 a)
+ /; operator + (int32 a)
;self.x += a
;self.y += a
;/
;/
- ;struct FVector2 () {}
+ ;struct FVector2 () {}
;/ \ No newline at end of file