Commit Graph

358 Commits

Author SHA1 Message Date
89ef8ee800 Parser top-level entity base 2024-02-06 02:32:29 -05:00
7e1695e056 Parser now remembers last token 2024-02-06 02:28:23 -05:00
fc9b3bbfa5 Un-participle-ify entity.Access 2024-02-06 02:27:09 -05:00
db66ff62fb Add Dot and DoubleDot as separate tokens 2024-02-06 02:23:15 -05:00
0c44b87797 Add ValueIs method to lexer.Token 2024-02-06 02:19:09 -05:00
9e20ba5210 Add TokenKind.String 2024-02-06 01:52:29 -05:00
799e7323bc Added expect functions to parser 2024-02-06 01:45:30 -05:00
0ae38485ee Add Token.Is() to check if token is any of a set of kinds 2024-02-06 01:31:52 -05:00
360785c224 Go mod tidy 2024-02-06 01:14:38 -05:00
463811ac83 Define basic parser structure 2024-02-06 01:12:07 -05:00
126bec1fc9 Cleared particple code from parser 2024-02-06 00:52:31 -05:00
c323715505 Parser test-common uses testcommon package 2024-02-06 00:49:28 -05:00
f7636ab410 Remove entity participle struct tags 2024-02-05 15:17:59 -05:00
decc5939a1 Remove entity dependency on participle 2024-02-05 15:16:11 -05:00
eab8163cf1 Merge pull request 'lexer-remove-participle' (#3) from lexer-remove-participle into remove-participle
Reviewed-on: sashakoshka/fspl#3
2024-02-05 20:06:38 +00:00
fc88e27abf Lexer has no dependency on participle now 2024-02-05 15:04:54 -05:00
0eea2b61a3 Added new Errorf function, added row/column offset 2024-02-05 15:03:13 -05:00
197fa01a1e Error package now formats tabs correctly 2024-02-05 11:44:34 -05:00
40bef8d02c TODO message in errors package 2024-02-01 03:21:23 -05:00
4713e15f28 Wrote tests for and fixed errors package 2024-02-01 03:20:17 -05:00
c24957f2e5 Added erros package 2024-02-01 02:51:04 -05:00
66771b3145 Put functionality from generator/test-common.go in its own package 2024-02-01 01:59:17 -05:00
f659866ae1 Fix crash when using int literals as floats 2024-01-29 13:29:53 -05:00
4aab296de3 Update tests 2024-01-29 03:30:54 -05:00
b4cb7454b0 Slice length fields are properly stored as Index values 2024-01-29 03:11:43 -05:00
c0f771db09 Update tests 2024-01-29 02:20:16 -05:00
5c8749d8cd Updated test cases for literals 2024-01-29 00:30:48 -05:00
06759a6e39 Array literals and string literals now exhibit identical behavior
They both fill unspecified data with zeros, and add a null
terminator when directly assigned to a pointer.
2024-01-29 00:25:34 -05:00
192044e074 String generation now uses correct type names, data length, and nulls 2024-01-28 17:10:03 -05:00
ff3efe646e Fix tests 2024-01-28 16:44:34 -05:00
01526aa914 Add source code printout for tests 2024-01-28 14:46:47 -05:00
31cf892a63 Broke up the monolithic TestLiteral 2024-01-28 14:36:04 -05:00
fa90e50c3b Increased the coverage of TestLiteralArray 2024-01-28 14:15:54 -05:00
83aefbae07 *Greatly* reduced the amount of excess IR related to string literals 2024-01-28 14:11:41 -05:00
1f53fc5214 Struct literals now support irDestLoc 2024-01-28 04:50:18 -05:00
3d6142f496 Added the ability for array literals to be undersized 2024-01-28 04:43:01 -05:00
235252b591 Added test for nested array literals
Who knew it would work first try?
2024-01-28 04:24:15 -05:00
185a6114a6 Array literals now support irDestLoc 2024-01-28 04:18:33 -05:00
a4c7212709 Add more tests for loops 2024-01-28 03:29:49 -05:00
e9a9fc75c6 Fixed extra lines after IR blocks 2024-01-28 03:18:39 -05:00
1b4a0621de Fix some issues with control flow, add tests 2024-01-28 03:16:05 -05:00
7e4abb7bba Add test case for comparisons on defined types 2024-01-28 02:18:18 -05:00
f595a2e742 FCmp and ICmp now accept defined types 2024-01-28 00:18:37 -05:00
9a4241cb11 Updated all tests except for literal_test.go
You Will See Why
2024-01-27 23:24:19 -05:00
3ca9b5ff50 Well it would help if it generated well formed IR 2024-01-27 23:00:03 -05:00
079a05ccca Assignment coercions are much more IR efficient 2024-01-27 22:45:28 -05:00
cfe12634ef Complete TestInterfaceInStruct (no longer segfaults somehow) 2024-01-27 19:49:22 -05:00
928fef02cd More using qualified names in IR 2024-01-27 18:16:30 -05:00
2f8b3fcad6 Oh my god I swapped the columns 2024-01-27 18:09:51 -05:00
7bc24eabe0 Added cool output to failed tests 2024-01-27 18:07:49 -05:00