Compare commits

...

728 Commits
v0.4.0 ... main

Author SHA1 Message Date
1f19292366 Update README.md
This project is frozen for now so it doesn't make sense to have dates for the roadmap.
2024-10-12 13:49:04 -06:00
3bc504aae6 Clarify install instructions in README.md 2024-04-19 08:31:57 +00:00
1085cfdc3c Typo 2024-04-12 05:10:28 +00:00
ecd9f79aae Add FAQ to README.md 2024-04-12 05:08:55 +00:00
c934a6c76c Updated readme (conditional comp. -> GOOS/GOARCH) 2024-04-09 19:00:59 +00:00
018dc31d04 Update FSPL parser readme 2024-04-03 11:04:14 -04:00
4b90ba77d3 Capitalize W*ndows 2024-04-02 18:36:52 +00:00
2a6f086350 Merge pull request 'implement-reserved-identifiers' (#76) from implement-reserved-identifiers into main
Reviewed-on: #76
2024-04-02 07:00:59 +00:00
767e7bd33c Fix analyzer tests that used "switch" as function name 2024-04-02 02:59:49 -04:00
6c41e71ade Analyzer tests for reserved idents 2024-04-02 02:59:42 -04:00
423f3ba22f Add function in parser for checking if a word is reserved 2024-04-02 02:59:11 -04:00
08eedaf74d Merge pull request 'os-native-filepaths' (#75) from os-native-filepaths into main
Reviewed-on: #75
2024-03-31 05:34:22 +00:00
88e10158ae It is now possible for tests to pass on windows 2024-03-31 01:33:28 -04:00
93d4aea1b1 Compiler tests properly add extension to obj files 2024-03-31 01:33:28 -04:00
810175b6c9 Object files have platform specific extensions 2024-03-31 01:33:28 -04:00
b6b0a1e592 parent 00110039e2
author Sasha Koshka <sashakoshka@tebibyte.media> 1711851967 -0400
committer Sasha Koshka <sashakoshka@tebibyte.media> 1711862974 -0400

Compiler tests now run on Windows

Compiler tests show linker log

Compiler tests show linker log
2024-03-31 01:33:08 -04:00
00110039e2 Compiler defaults to .o when output name isn't specified 2024-03-28 18:16:58 -04:00
15e418d8c1 Add custom fs implementation 2024-03-28 18:12:37 -04:00
1c61235b63 openAbsolute should strip out the volume name on Windows 2024-03-28 17:16:50 -04:00
4e6103418c Compiler normalizes paths before passing them to an fs 2024-03-28 16:52:31 -04:00
e805060370 Generator native uses GOARCH and GOOS instead of cond. compilation 2024-03-28 16:02:56 -04:00
eccb2e9a5b Compiler uses runtime.GOOS instead of conditional compilation 2024-03-28 13:11:27 -04:00
e574b248e5 Total windows path separator death 2024-03-27 13:39:38 -04:00
43ed297a12 Add Windows paths to design/units.md 2024-03-27 13:38:13 -04:00
76615df4d4 Add option to specify module search paths manually 2024-03-27 13:13:22 -04:00
2caed5b4ae Add an executable filetype 2024-03-27 12:52:20 -04:00
cd396952f2 Certain filename extentions depend on target os 2024-03-27 12:40:45 -04:00
0404202691 Compiler takes in a target 2024-03-27 12:10:19 -04:00
92ad52b2aa Add OS field to Target 2024-03-27 12:05:30 -04:00
10246f7268 Add untested windows native paths 2024-03-27 11:24:26 -04:00
2edda8a960 Add stub for Windows native parameters 2024-03-26 13:15:56 -04:00
11e7a83eb4 Add native paths for unix 2024-03-26 13:15:03 -04:00
9b45bc56d4 Resolver is now used behind a pointer 2024-03-26 13:12:38 -04:00
b9e0b3265e fsplc and fsplmod use rooted paths to identify things
Remedies #71
2024-03-26 02:07:27 -04:00
48fa712cb7 Update fsplc/doc.go usage 2024-03-26 02:07:04 -04:00
cad6a0759a Compiler now uses LLVM-like output filetype names
Remedies #40
2024-03-26 01:53:10 -04:00
6c7fcf6045 Add compiler test for puts libc function 2024-03-26 01:18:39 -04:00
eb2c1c8aed Fixed error message for types in match exprs not being unions 2024-03-26 01:12:47 -04:00
78ea6e45b2 Update roadmap 2024-03-26 01:01:02 -04:00
ebafbc2a38 Merge pull request 'implement-switch-expressions' (#70) from implement-switch-expressions into main
Reviewed-on: #70
2024-03-26 04:55:45 +00:00
650289f03e Generate switch statements 2024-03-26 00:42:27 -04:00
5dda7b2186 Generate match statement default cases 2024-03-25 22:34:24 -04:00
4931f97496 Switch statement analysis passes tests 2024-03-25 19:50:54 -04:00
f3bdfef5c5 Add analyzer tests to switch statements 2024-03-25 19:49:48 -04:00
a50a5febb9 Untested analysis of switch statements 2024-03-25 12:08:28 -04:00
6916b3b7b1 Analyze match expression default cases 2024-03-25 11:29:24 -04:00
d8f82d3646 Parse switch expressions 2024-03-25 02:18:18 -04:00
e27fb9e79b Parse default match cases 2024-03-25 01:53:40 -04:00
1f04c3a593 Added switch statements, default cases to entity 2024-03-25 01:16:41 -04:00
7e05785c09 Added switch statements to spec 2024-03-25 00:46:30 -04:00
dcad5a2d18 Update roadmap 2024-03-25 00:36:04 +00:00
3cd3384006 Remove the star from array literals 2024-03-24 20:31:25 -04:00
7f58f7da8b Change the compiler test names to make them more legible 2024-03-24 20:09:10 -04:00
4342c15e38 Merge pull request 'implement-range-loops' (#68) from implement-range-loops into main
Reviewed-on: #68
2024-03-25 00:03:53 +00:00
18e7850b58 Update generator tests 2024-03-24 20:02:57 -04:00
70c58f74de Fix assignment from array to slice 2024-03-24 19:57:24 -04:00
185ef7f6f9 For loops loop back around to the loop header 2024-03-24 03:35:04 -04:00
f3c0901493 For loop elements are properly copied 2024-03-24 03:09:33 -04:00
f84ddf8cad What? 2024-03-20 13:29:26 -04:00
cd08801a29 Added a timeout for compiler tests 2024-03-20 12:38:46 -04:00
84e21b3832 Update generator test cases 2024-03-20 11:54:49 -04:00
648b1df547 Generator generates valid gep index for for loop indexing 2024-03-20 11:51:44 -04:00
a4443444c1 Add compiler test cases for loops 2024-03-20 11:35:14 -04:00
a647f27e8c Fix test cases 2024-03-20 11:19:24 -04:00
ecd6eba434 Loops now handle multiple break statements correctly 2024-03-20 04:19:47 -04:00
50f088842a For loop generation should be more correct now 2024-03-20 02:55:31 -04:00
491a9b2369 Untested for loop generation 2024-03-20 02:52:01 -04:00
a9adc77658 For loop generation stub 2024-03-20 02:09:26 -04:00
16686bfa3d Update README.md 2024-03-19 19:15:18 +00:00
7cf770df7f Update usage instructions 2024-03-19 19:13:07 +00:00
909d463637 Update roadmap part one bazillion 2024-03-19 18:42:33 +00:00
9b1f6d695c Oh come on 2024-03-19 18:39:52 +00:00
838c34b0a1 Update roadmap again 2024-03-19 18:39:29 +00:00
7d74e59e64 Update roadmap 2024-03-19 18:30:05 +00:00
c0476f14ae Analyze for loops 2024-03-16 13:25:53 -04:00
bb1886ab9c Add tests for for loop analysis 2024-03-16 13:23:35 -04:00
197373ee27 Add breakable interface 2024-03-16 01:43:56 -04:00
c576c4022e Add for parsing 2024-03-15 03:03:59 -04:00
67a8b67dec Add for parsing to parser test 2024-03-15 03:03:39 -04:00
8d69e4cdd3 Fix For.String() 2024-03-15 03:02:50 -04:00
ec873ea895 Index and Element must be declarations 2024-03-15 02:50:28 -04:00
45ab5d95a2 Add range loops to entity 2024-03-14 22:28:50 -04:00
bb2caeb88a Add range loops to spec 2024-03-14 22:28:35 -04:00
b07dbf8eba Merge pull request 'entity-consistency' (#57) from entity-consistency into main
Reviewed-on: #57
2024-03-14 07:21:34 +00:00
babcce643f Update compiler 2024-03-14 03:20:55 -04:00
6be48aea28 Update generator 2024-03-14 03:20:47 -04:00
f58c01be52 Updated analyzer 2024-03-14 03:18:46 -04:00
4df7a8905e Updated parser 2024-03-14 03:14:08 -04:00
2be41be609 Add the cool epic to meta 2024-03-14 02:43:59 -04:00
0a56a61f4f Only top level entities are in toplevel.go 2024-03-14 02:41:51 -04:00
fc2fb42e53 Misc entities now have Pos/Position thing going on 2024-03-14 02:40:13 -04:00
9335841fc0 Clean up wording in type interface documentation 2024-03-14 02:37:58 -04:00
e35a576022 Add more behaviors to expression interface 2024-03-14 02:37:12 -04:00
1c9700378c Moved key/hash stuff into its own file 2024-03-14 02:36:39 -04:00
56b91d788f Add more methods to toplevel entities 2024-03-14 02:23:26 -04:00
fc6efafc34 Add access control modes to spec 2024-03-14 02:11:26 -04:00
a147143fc3 Missed a spot 2024-03-14 01:55:18 -04:00
a8fd79991c Renamed restricted access to opaque access 2024-03-14 01:54:22 -04:00
a9c85bf017 Changed restricted access specified from ~ to # 2024-03-14 01:42:19 -04:00
db98e590fc Change interface symbol from ~ to & 2024-03-13 23:05:58 -04:00
e0d4be8db8 Removed "in" from match statement 2024-03-13 22:44:11 -04:00
0ea05e5836 Fix calling methods on pointers to types in other units 2024-03-13 11:51:51 -04:00
d2c8fdd05c Add generator tests for referring to methods in other units 2024-03-13 11:15:15 -04:00
1565376418 Add TestMethodPtr to generator 2024-03-11 11:50:12 -04:00
566bf41843 Re-format roadmap 2024-03-07 23:20:06 +00:00
45f46b04b0 Merge pull request 'assign-return-break-to-anything' (#56) from assign-return-break-to-anything into main
Reviewed-on: #56
2024-03-06 22:42:18 +00:00
be08308cb2 Add a compiler test for this 2024-03-06 17:41:52 -05:00
4f31b712df Document new Bool width in spec 2024-03-06 16:51:11 -05:00
8607f08093 Bool is now an i1 2024-03-06 16:46:27 -05:00
ff99c37219 Add tests about this to the generator 2024-03-06 16:44:22 -05:00
e889a9c49b Generator understands assigning return/break to things 2024-03-06 16:43:58 -05:00
ebc4aacf5b Updated spec 2024-03-06 15:37:30 -05:00
6643c92948 Break and return can be assigned to anything 2024-03-06 15:34:00 -05:00
4df8a45a16 Add test cases for #55 2024-03-06 15:31:47 -05:00
3d6a258873 Rename analyzer's match test file to control flow test 2024-03-06 15:21:33 -05:00
6a9be94601 Merge pull request 'implement-union-types' (#54) from implement-union-types into main
Reviewed-on: #54
2024-03-06 20:16:54 +00:00
bf62730e79 One last test 2024-03-06 15:16:15 -05:00
040be67476 Add compiler tests for unions/matches 2024-03-06 15:06:21 -05:00
6cd51f3c5f Add match/union generator tests 2024-03-06 14:50:58 -05:00
ab24c1cfc1 Generator supports assigning unions to unions 2024-03-06 14:49:49 -05:00
e94d438332 Use TypesEqual() instead of comparing hashes 2024-03-06 14:16:36 -05:00
ef947b8dc6 Analyzer lets unions of the same type be assigned to eachother 2024-03-06 14:00:37 -05:00
41116e0b13 Add union assignment tests to analyzer 2024-03-06 13:50:55 -05:00
98d8edc319 Generate phi node for default case in match switch 2024-03-06 13:09:20 -05:00
ff749a03dd Generate assignment to unions 2024-03-06 13:09:03 -05:00
daea6cb22a Generate match statements 2024-03-06 00:42:40 -05:00
54f69ca786 Add match stub 2024-03-05 03:32:31 -05:00
779aaf3cea Generate union types 2024-03-05 03:15:44 -05:00
8ec7929c1e New test TestMatchErrNotUnion 2024-03-04 14:22:39 -05:00
fd8a15db66 Analyze match expressions 2024-03-04 14:19:33 -05:00
b1cef5d95f Add more semantic fields to Match and Case 2024-03-04 14:09:48 -05:00
2a6778837f Improved match tests 2024-03-04 14:09:19 -05:00
8fa9a579fd entity.Match.String() prints "in" instead of "on" 2024-03-04 13:36:07 -05:00
ce79e16de7 Add some match statement tests 2024-03-04 13:34:22 -05:00
cd91f9dc20 Add more tests for the union type 2024-03-02 12:36:22 -05:00
24268e498e Add some tests for the union type 2024-03-02 12:26:16 -05:00
a6dabc27f9 The assemble map pattern doesnt work for unions
That entire file needs to be completely rewritten is stg
2024-03-02 12:21:28 -05:00
459020126d Add assignment rules for unions 2024-03-02 12:12:43 -05:00
3a1d9632dc Analyzer checks uniqueness of types in union by comparing hashes 2024-03-02 12:09:49 -05:00
8beb785009 And so does analyzer 2024-03-02 01:34:16 -05:00
66633be90c Parser understands these new developments 2024-03-02 01:30:45 -05:00
bc88782938 Add Position() method to type 2024-03-02 01:26:29 -05:00
e30f2a74da Augh 2024-03-01 21:45:14 -05:00
0e2259bb45 Add match test to parser, fixed parsing and stringing of match 2024-03-01 21:44:20 -05:00
f94c562896 Added match statements to the parser
Added match statements to the parser
2024-03-01 21:36:40 -05:00
fb7558576e Add match expressions to entity 2024-03-01 21:22:32 -05:00
8d611b6fa6 Add match statement to expresison parsing decision tree 2024-03-01 21:10:03 -05:00
c17a381ba5 Add match statements to the spec 2024-03-01 21:03:49 -05:00
c45d0215ba Add union types to parser 2024-03-01 12:35:11 -05:00
0135972e14 Add parser test for union type 2024-03-01 12:34:29 -05:00
24fa83b004 Update expression parsing decision tree in parser/fspl/README.md 2024-03-01 12:11:09 -05:00
b40953a0ec Add TypeUnion to entity 2024-03-01 03:00:17 -05:00
cde0eec9aa Add union type syntax to spec 2024-03-01 02:54:26 -05:00
096da5bdfd Types can now produce hashes of themselves 2024-03-01 02:53:29 -05:00
fe14072392 Add a hashing system to Entity 2024-03-01 02:53:10 -05:00
0947a8de44 Add design for union type 2024-03-01 02:10:21 -05:00
278a243804 Add pkg.go.dev badge 2024-03-01 00:24:04 -05:00
005b2fcd56 Inline string literal since #46 has been remedied 2024-03-01 00:17:39 -05:00
5e93a7afd1 TestLiteralReference is now an error test 2024-03-01 00:13:32 -05:00
c22ac87cd0 Fixed analyzer.isLocationExpression 2024-03-01 00:12:21 -05:00
8ae6ea3626 Add test case for #46 2024-03-01 00:04:15 -05:00
8e3b21f807 Merge pull request 'generator-multi-unit-tests' (#51) from generator-multi-unit-tests into main
Reviewed-on: #51
2024-03-01 05:00:07 +00:00
2ae4111f64 Add some multiunit tests from the analyzer to the generator 2024-02-29 23:59:15 -05:00
b1fc69dacd Change name of generator multiunit test to match analyzer 2024-02-29 23:52:09 -05:00
ee02e71b1d Putting complete covering of bit casts on hold for now 2024-02-28 20:08:54 -05:00
80e310010e Covered more cases with bitcast 2024-02-28 20:08:43 -05:00
fad3597d7a Add more test cases for bitcasting pointers 2024-02-28 19:49:35 -05:00
4cfa431919 Merge branch 'main' into generator-multi-unit-tests 2024-02-28 19:42:11 -05:00
6b4ea0e255 Merge pull request 'analyzer-fix-bitcast' (#50) from analyzer-fix-bitcast into main
Reviewed-on: #50
2024-02-29 00:34:41 +00:00
e2d944d534 The buge (#47) is vanquished!!!! 2024-02-28 19:30:33 -05:00
81c4f1e46b Expressions now have HasExplicitType() 2024-02-28 18:31:46 -05:00
60ef92bd4c Add test case to analyzer for #47 2024-02-28 18:03:15 -05:00
36456ad1bc Completed out TestUnitWriterInterface 2024-02-28 17:43:17 -05:00
ad8cf0f48f Renamed TestPtrIntCast to TestPtrCast, will put more things in it 2024-02-28 17:36:11 -05:00
75b48b7000 Add and fix test case for #47 (on the generator side at least) 2024-02-28 13:36:21 -05:00
ddf1b57799 Generator uses proper type owner UUID during interface conversion 2024-02-28 12:30:38 -05:00
802a492be1 Generator multiunit tests print what is being analyzed 2024-02-28 11:50:41 -05:00
552c73f606 Fix example unit UUID 2024-02-27 19:50:55 +00:00
e26728d27f Minor grammar fixes 2024-02-27 19:41:19 +00:00
981a5332e7 Fix ordering of dirs 2024-02-27 19:32:23 +00:00
1f5e0fe8c1 Correct dir paths 2024-02-27 19:30:54 +00:00
b3ae80e809 Add problematic multiunit test case from #49 2024-02-27 03:06:54 -05:00
e5344c034b Merge pull request 'test-compiled-code' (#48) from test-compiled-code into main
Reviewed-on: #48
2024-02-27 07:50:17 +00:00
d6f0c470ee Compiler has bug() to wrap unexpected errors 2024-02-27 02:45:32 -05:00
ef07772ce4 Add some interface tests to compiler 2024-02-27 02:36:35 -05:00
7720a1f629 Compiler debug output makes more sense 2024-02-27 02:33:35 -05:00
90d735163b Generator's "errNotFound" is more useful when it bubbles to the surface 2024-02-27 02:29:52 -05:00
1d90b3c7d7 Fix analyzer.Tree.methodExists and clear raw maps
This was too urgent not to continue without
2024-02-27 02:24:03 -05:00
5d5ffb9c4c Add test for printing argv
Disabled for now due to #47
2024-02-27 00:22:02 -05:00
b9eec89773 Add test case for counting cli args 2024-02-27 00:09:01 -05:00
64d85c7b70 Temporarily circumvent crash in analyzer #46 2024-02-27 00:00:33 -05:00
1d4f958efa Added a test case for depending on compiled units 2024-02-26 23:59:47 -05:00
b441cc1e7b Added a test case for depending on compiled units 2024-02-26 23:50:14 -05:00
48876a8229 Tests can now compile dependencies first 2024-02-26 23:32:40 -05:00
c9f453f35e Fixed test case file for systeminclude 2024-02-26 14:40:03 -05:00
c20a5deede Resolver no longer requires system units to be files (????????) 2024-02-26 14:39:44 -05:00
496d4aeb01 Added test case for grabbing a module from /usr/include/fspl 2024-02-26 14:33:31 -05:00
aa3cabe82b Fix hello world test 2024-02-26 14:24:47 -05:00
2a74389830 Compiler test now uses testcommon.CompareHex 2024-02-26 14:22:51 -05:00
e898379707 Add testcommon.CompareHex 2024-02-26 14:22:33 -05:00
dc47a4c8c0 testcommon.LogColumns has a configurable width 2024-02-26 14:18:09 -05:00
2edbd6c8b3 Split compiler_test.go into common file and test file 2024-02-26 14:04:37 -05:00
76eed1153e Added test case for exit code 2024-02-26 14:03:10 -05:00
c28ea57777 Compiler test now holds output from compiler until end 2024-02-26 13:56:37 -05:00
04420cb7d3 Compiler uses a default optimization level when unconfigured 2024-02-26 13:46:54 -05:00
a418baa113 Add the hello world test case 2024-02-26 13:46:30 -05:00
27b11c0cdc Add a test-data directory for compiler 2024-02-26 13:46:10 -05:00
6f9b6f07d9 Compiler now passes relatvive paths to fs.FS as it should 2024-02-26 12:50:49 -05:00
d2f4dcd8f3 Much of the compiler now uses fs.FS instead of os 2024-02-26 11:46:59 -05:00
59d38d8c9d Moved everything that should touch "os" to compiler.go 2024-02-26 11:36:16 -05:00
aa07bee99d Moved Compiler.CompileUnit into another file
Need to be sure it is the only thing that can access OS files
2024-02-26 11:35:03 -05:00
c93f3916a1 Fixed doc for fsplc and fsplmod 2024-02-23 03:20:51 -05:00
14b36bba1a Add a tool to manage modules 2024-02-23 01:41:36 -05:00
3297f6671e Lexer skips over zero runes now 2024-02-23 01:08:58 -05:00
1fd34731ff Metadata.String quotes UUID 2024-02-23 00:24:09 -05:00
bd4ed45a45 entity.Metadata now has String() 2024-02-23 00:18:46 -05:00
4987ed0b4d Cli now handles printing stuff 2024-02-22 21:24:07 -05:00
39f62a3d3f Cli now displays usage information for subcommands correctly 2024-02-22 20:25:37 -05:00
367f4c5d34 Update fsplc to use new cli features 2024-02-22 20:17:38 -05:00
793314fdd7 Update fsplc doc 2024-02-22 20:17:23 -05:00
5ca80ded92 Add more functionality to cli package 2024-02-22 20:12:41 -05:00
23052aa6f0 Changed repository import paths 2024-02-22 19:22:53 -05:00
9d43ef75ee Changed go.mod version to 1.19 2024-02-21 13:49:46 -05:00
418e013dda Reflected those changes in unit design doc 2024-02-21 13:46:26 -05:00
ddafa0935a Module search paths are more useful now 2024-02-21 13:45:51 -05:00
24b15cfea6 Merge branch 'implement-modules' 2024-02-21 13:27:35 -05:00
bc9f1302b2 Merge branch 'main' into implement-modules 2024-02-21 18:26:44 +00:00
e4eb8c4e62 Updated compiler to use Resolver 2024-02-21 13:21:58 -05:00
222dae2dac Add a "Resolver" that resolves unit addresses 2024-02-21 13:21:41 -05:00
39d584bd1b Compiler understands compiling to . 2024-02-20 01:48:18 -05:00
d4a7420471 Compiler now only parses module files that end in .fspl 2024-02-20 01:39:07 -05:00
108c89c18e cli package now prints out usage correctly 2024-02-20 01:27:26 -05:00
f0fbe6440a Compiler is a bit more adaptable now 2024-02-20 01:23:00 -05:00
5890e6188b Oops haha, print statement. 2024-02-20 00:52:30 -05:00
07ea408d4e The compiler now compiles 2024-02-20 00:52:23 -05:00
f06a0e29b9 Updated generator tests 2024-02-19 23:05:30 -05:00
7600bc28d9 Fixed generator map sorting 2024-02-19 21:57:21 -05:00
a22b6137d5 Types are given proper link names in the generator 2024-02-19 21:09:21 -05:00
306b029951 Generator now has module support 2024-02-19 21:00:20 -05:00
2f2e762d02 Documented how methods are named 2024-02-19 12:09:21 -05:00
ff18aae2b6 entity.Key now has an optional method field 2024-02-19 12:05:13 -05:00
4166fb8817 Move Key to Entity 2024-02-19 11:41:36 -05:00
d3df73e0ec Fixed wording issue in design/units.md 2024-02-19 11:18:17 -05:00
569dd14f59 Analyzer does not allow operations on restricted types 2024-02-17 00:19:13 -05:00
4b87551702 Analyzer does not allow literals to be assigned to restricted types 2024-02-17 00:12:32 -05:00
9d009a1f64 Analyzer does not allow value casting of restricted types 2024-02-16 23:52:52 -05:00
1b92c2cf81 Analyzer does not allow subscripting, slicing of restricted types 2024-02-16 23:10:38 -05:00
3bc7467c85 Add more multi-unit test cases 2024-02-16 22:50:29 -05:00
ed282efdb7 Analyzer does not allow marking functions/methods as restricted 2024-02-16 22:31:38 -05:00
654ba361e2 Analyzer does not allow member access on restricted types 2024-02-16 22:26:22 -05:00
2d1b2bab43 Analyzer does not allow calling behaviors of restricted iface 2024-02-16 22:19:47 -05:00
f027a50756 Analyzer no longer thinks String is private 2024-02-16 22:13:30 -05:00
444637bc15 Analyzer now fills out this information 2024-02-16 13:51:11 -05:00
f78a71950b Entity now stores unit and access information for types 2024-02-16 13:30:15 -05:00
c4cb1ce273 Should also make sure ~ only applies to types 2024-02-16 13:09:48 -05:00
eb9444dad3 Add more test cases for restricted typedefs in units 2024-02-16 13:06:40 -05:00
f93c9b26c8 When analyzing a typedef, update the unit information first 2024-02-16 12:54:34 -05:00
37aa620f33 This is mega silly 2024-02-16 12:49:47 -05:00
158a4220be Pass TestUnitPrivateMethod Err 2024-02-16 12:48:25 -05:00
1fea25ba91 Fix behavior of Tree.analyzeMethodOrBehavior() 2024-02-16 12:43:42 -05:00
6c7c7c9d99 Real quick add unicode test to parser 2024-02-15 12:43:09 -05:00
fcf44fd1ec Ok so maybe that one commit wasn't entirely true 2024-02-15 01:12:51 -05:00
ed498a3bc0 Analyzer checks access permissions when using named types 2024-02-15 01:08:21 -05:00
159317965d Parser properly unions position of named types 2024-02-15 01:07:25 -05:00
6b9cdcc239 Parser does *not* actually discard private toplevels while skimming
And it shouldn't! Because it doesn't, the analyzer can say "this is
private" instead of "this doesn't exist".
2024-02-15 01:06:21 -05:00
87c2acf650 Add some initial analyzer tests for units 2024-02-14 23:20:01 -05:00
43a488fb58 I ohasdhjklashf dslkfj ksdl 2024-02-14 23:10:43 -05:00
14566196a9 Forgot about the nickname map haha 2024-02-14 22:48:55 -05:00
63a9b5b540 Should be able to write tests for units now.
Haha unit tests. Surely this won't get confusing.
2024-02-14 22:39:08 -05:00
d8714cbc1d Improved analyzer testing infrastructure 2024-02-14 22:06:10 -05:00
199da663e9 Parser now actually skims files 2024-02-14 18:49:59 -05:00
fb6cbe2c9d Improved the skim test case 2024-02-14 17:40:37 -05:00
9bfc3bf4c6 Add parser test case for skimming 2024-02-14 17:35:44 -05:00
86145c0975 All analyzer tests pass 2024-02-14 17:24:00 -05:00
cbfabba8a7 I mispelled stream 2024-02-14 13:49:06 -05:00
724178ce6e Made analyzer error testing 20% cooler 2024-02-14 13:48:23 -05:00
05bd29fc71 Use stram0.fspl so I don't have to rewrite every test 2024-02-14 13:41:24 -05:00
cd4e9608d0 Analyzer does not crash 2024-02-14 13:40:26 -05:00
b27684de46 Analyzer compiles 2024-02-14 13:35:50 -05:00
7d93a0abf6 Add section about uniqueness and UUIDs to units design doc 2024-02-14 13:00:11 -05:00
cb33628996 Begin implemeting my better idea in the analyzer 2024-02-14 10:38:03 -05:00
22dc2ef175 Made wording in entity even better 2024-02-14 10:22:33 -05:00
025302a959 Add a file with my better idea in it 2024-02-14 10:22:08 -05:00
6cd60cc9a6 So I have a better idea 2024-02-14 10:06:20 -05:00
ccb7fe46d0 treeParser.lookupUnit returns the current unit UUID on empty string 2024-02-14 02:04:28 -05:00
d3d739a24d Parser and entity now refer to units as units instead of modules 2024-02-14 02:01:01 -05:00
da4f9b8d67 Parser now translates names to unit UUIDs 2024-02-14 01:55:51 -05:00
89b7273c2f Entity now deals in UUIDs 2024-02-14 01:48:47 -05:00
3d75cdbd02 Parser now has something of a concept of modules 2024-02-14 01:44:25 -05:00
7d32211e70 Add module names to top level entities 2024-02-13 21:36:08 -05:00
c3bbbc1536 Mini-analysis of metadata in Compiler.ParseModule 2024-02-13 21:24:13 -05:00
62cf6deeb6 Break compiler out into its own package 2024-02-13 21:01:13 -05:00
2c968404ea Break out ParseModule and ParseSourceFile from CompileUnit 2024-02-13 20:55:59 -05:00
9d70abc084 Metadata is now an entity 2024-02-13 20:53:15 -05:00
b8afa6d9c0 Metadata is now an entity 2024-02-13 20:52:25 -05:00
42cf7eed67 Compiler CLI can drive internals 2024-02-13 19:15:40 -05:00
5448d07815 Module compilation stub in compiler command 2024-02-13 19:10:46 -05:00
d117e15157 Add method of entity.Address to generate a nickname 2024-02-13 19:10:24 -05:00
c89cbc24fe Add some utility methods to entity.Address 2024-02-13 17:29:42 -05:00
8b5c6c2d8a Auto-nicknaming should happen at the analysis stage 2024-02-13 17:08:48 -05:00
ab9b0a3fa3 Add test cases for metadata parser 2024-02-13 16:33:15 -05:00
97f149cf42 Add metaParser test-common.go 2024-02-13 16:32:59 -05:00
7ed50c8d6f Implemented metadata file parsing 2024-02-13 16:22:10 -05:00
f35ba89cd0 Changed wording in fsplParser.treeParser.bug() 2024-02-13 16:21:50 -05:00
8d2d71be89 Nickname is no longer a type 2024-02-13 16:20:45 -05:00
59c2ed8502 Flesh out meta.Tree and meta.treeParser with more methods 2024-02-13 16:03:22 -05:00
5d86161b63 Add Directive interface 2024-02-13 16:03:07 -05:00
c7043c2217 Minor readme fixes 2024-02-13 19:58:28 +00:00
b78d5acff2 Add information (or lack thereof) of learning the language 2024-02-13 19:57:22 +00:00
f39ba91450 Update roadmap 2024-02-13 19:40:51 +00:00
254f3f84c0 License under GPLv3 2024-02-13 19:16:11 +00:00
73b4643162 Add metadata entities 2024-02-13 13:29:30 -05:00
ab7d72dfe4 Updated compiler command 2024-02-13 13:16:03 -05:00
76df41f813 I blame debian for this 2024-02-13 13:14:45 -05:00
b743e56c2a Updated generator 2024-02-13 13:12:53 -05:00
cf40ab0707 Updated analyzer 2024-02-13 13:12:45 -05:00
6b56600c8f Improve doc comments for Parser 2024-02-13 13:07:37 -05:00
5f035df827 Separated parser into two packages 2024-02-13 13:03:22 -05:00
5b24bdc32b Extracted re-usable parsing utilities from parser.parser 2024-02-13 12:31:52 -05:00
4a5928e268 Asajkdhaskldj 2024-02-13 00:50:30 -05:00
9bd91b73ab Rename module design doc to unit design doc 2024-02-13 00:27:51 -05:00
ca690b9270 Add future work section 2024-02-13 00:10:14 -05:00
051f96b639 Revised module design, cleared up wording 2024-02-13 00:01:39 -05:00
4d4572e36d Add design document for modules 2024-02-12 23:37:04 -05:00
b44e4f3f9d Merge pull request 'fix-nil-void-type' (#36) from fix-nil-void-type into main
Reviewed-on: sashakoshka/fspl#36
2024-02-12 19:49:57 +00:00
4e385edac8 Analyzer makes use of entity.FormatType 2024-02-12 14:47:49 -05:00
069371d859 Add test cases for formatting nil type as Void 2024-02-12 14:47:09 -05:00
cb3e5b6bfb Add entity.FormatType() 2024-02-12 14:34:49 -05:00
7d2f435d18 Merge pull request 'polish-compiler' (#35) from polish-compiler into main
Reviewed-on: sashakoshka/fspl#35
2024-02-11 18:06:08 +00:00
203fb4fca4 Compiler now takes in a format override parameter 2024-02-11 12:55:43 -05:00
ea0f2ca169 Add cli.NewValueSet() to validate against several values 2024-02-11 12:38:46 -05:00
0ca9f5c069 Fix some issues with cli related to argument values 2024-02-11 12:37:08 -05:00
c5e75a7182 Better documentation for cli package 2024-02-11 12:32:53 -05:00
0d2d7fae02 Broke cli into a separate package 2024-02-11 12:13:49 -05:00
0c48538888 Compiler now parses CLI argument values correctly 2024-02-11 03:40:47 -05:00
2932e0c7d6 Compiler prints a special error if output path has no extension 2024-02-11 03:40:00 -05:00
21ab4f5fca errors.Format does not crash when formatting normal error 2024-02-11 03:35:27 -05:00
b4a886b126 Created a new argument parsing system 2024-02-11 03:33:16 -05:00
2bc5eb1f49 Break fsplc Compiler type into a different file 2024-02-11 01:55:07 -05:00
4895f09f99 Merge pull request 'fix-chained-methods' (#32) from fix-chained-methods into main
Reviewed-on: sashakoshka/fspl#32
2024-02-11 02:35:37 +00:00
bf73821dbd New test for generator confirmed to work, filled out 2024-02-10 21:31:10 -05:00
2d5a747be6 testcommon last column no longer has trailing spaces 2024-02-10 21:24:09 -05:00
2571fcde99 Add same test as stub to generator 2024-02-10 21:20:24 -05:00
e6bc09e622 Fixed crash in analyzer that caused #31 2024-02-10 21:16:22 -05:00
29608f87da Test case code was wrong, methods need to return Number 2024-02-10 21:15:56 -05:00
07b7571f94 Analyzer test-common now formats errors properly 2024-02-10 21:14:30 -05:00
d6d7423087 Add #31 as test case 2024-02-10 21:10:49 -05:00
05f31c00a8 Add .editorconfig 2024-02-10 19:03:38 -05:00
af1b032a50