From 362f7c9c45598b429c92e67756f41b690043e0c4 Mon Sep 17 00:00:00 2001 From: Marc Vertes Date: Fri, 22 Mar 2024 16:59:25 +0100 Subject: feat: add initial support for import, provide minimal fmt (#6) The `import` statement is now parsed. It only provides minimal support for the `fmt` package (only `Println` symbol is defined). This should be sufficient to pass a few tests. Full support of package namespaces, source and binary imports will be supported later, based on this work. --- scanner/scan_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scanner/scan_test.go') diff --git a/scanner/scan_test.go b/scanner/scan_test.go index 257b1ab..c3f62a8 100644 --- a/scanner/scan_test.go +++ b/scanner/scan_test.go @@ -130,7 +130,7 @@ def"`, tok: `Ident"f" ParenBlock"(4)" Semicolon Return Semicolon `, }, { // #28 src: "f(3).\nfield", - tok: `Ident"f" ParenBlock"(3)" Period Ident"field" Semicolon `, + tok: `Ident"f" ParenBlock"(3)" Period"." Ident"field" Semicolon `, }, { // #29 src: "\n\n\tif i < 1 {return 0}", tok: `If Ident"i" Less Int"1" BraceBlock"{return 0}" Semicolon `, -- cgit v1.2.3