diff --git a/analyzer/func-section.go b/analyzer/func-section.go new file mode 100644 index 0000000..f9c26bb --- /dev/null +++ b/analyzer/func-section.go @@ -0,0 +1,3 @@ +package analyzer + +// TODO diff --git a/analyzer/func-section_test.go b/analyzer/func-section_test.go new file mode 100644 index 0000000..389d7cd --- /dev/null +++ b/analyzer/func-section_test.go @@ -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) +} diff --git a/tests/analyzer/funcSection/main.arf b/tests/analyzer/funcSection/main.arf new file mode 100644 index 0000000..1e36ef1 --- /dev/null +++ b/tests/analyzer/funcSection/main.arf @@ -0,0 +1,8 @@ +:arf +--- + +type ro aCString:{U8} + +func ro bArbitrary + --- + 'puts' [cast 'hellorld\000' aCString]