Compare commits
2 Commits
3067b64f47
...
ae0765b8f4
Author | SHA1 | Date |
---|---|---|
Sasha Koshka | ae0765b8f4 | |
Sasha Koshka | 2a1a48d9c5 |
|
@ -0,0 +1,3 @@
|
|||
package analyzer
|
||||
|
||||
// TODO
|
|
@ -0,0 +1,18 @@
|
|||
package analyzer
|
||||
|
||||
import "testing"
|
||||
|
||||
func TestFuncSection (test *testing.T) {
|
||||
checkTree ("../tests/analyzer/funcSection", false,
|
||||
`
|
||||
typeSection ro ../tests/analyzer/funcSection.aCString
|
||||
type 1 pointer {Int}
|
||||
funcSection ro ../tests/analyzer/funcSection.bArbitrary
|
||||
block
|
||||
arbitraryPhrase
|
||||
command 'puts'
|
||||
cast
|
||||
type aCString
|
||||
arg string 'hellorld` + "\000" + `'
|
||||
`, test)
|
||||
}
|
|
@ -37,5 +37,9 @@ typeSection ro ../tests/analyzer/typeSection.fInheritObjectFromOther
|
|||
member ro beak
|
||||
type 1 basic Int
|
||||
arg uint 238
|
||||
typeSection ro ../tests/analyzer/typeSection.gPointer
|
||||
type 1 pointer {Int}
|
||||
typeSection ro ../tests/analyzer/typeSection.hDynamicArray
|
||||
type 1 dynamicArray {Int}
|
||||
`, test)
|
||||
}
|
||||
|
|
|
@ -53,7 +53,7 @@ func (what Type) ToString (indent int) (output string) {
|
|||
case TypeKindPointer:
|
||||
output += " pointer"
|
||||
case TypeKindVariableArray:
|
||||
output += " variableArray"
|
||||
output += " dynamicArray"
|
||||
}
|
||||
|
||||
if what.points != nil {
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
:arf
|
||||
---
|
||||
|
||||
type ro aCString:{U8}
|
||||
|
||||
func ro bArbitrary
|
||||
---
|
||||
'puts' [cast 'hellorld\000' aCString]
|
|
@ -19,4 +19,8 @@ type ro fInheritObjectFromOther:required.bBird
|
|||
ro wing 2
|
||||
ro beak:Int 238
|
||||
|
||||
type ro gPointer:{Int}
|
||||
|
||||
type ro hDynamicArray:{Int ..}
|
||||
|
||||
# TODO: test a type that has a member pointing to itself
|
||||
|
|
Reference in New Issue