811d3787c4
lang: ast: add a BLOCK ast node to hold lists of expressions
2024-11-28 10:26:53 +00:00
7f9894d8f9
lang: fix a bunch of compiler warnings
2024-11-27 22:45:34 +00:00
9df8474515
frontend: always print lex tokens when compiling file or repl input
2024-11-27 22:30:42 +00:00
101d87e09d
lang: ast: implement simple identifier and operator expression parsing
2024-11-27 22:29:29 +00:00
31de937a21
lang: add operator precedence and associativity definitions
2024-11-27 22:29:01 +00:00
c7e3cea9b9
lang: lex: add definitions for some missing symbols and keywords
2024-11-27 22:28:17 +00:00
5af2692555
doc: document some additional operators in Person.im
2024-11-27 22:26:59 +00:00
a5c0606221
lang: lex: fix push_token not setting lex_prev_token
2024-11-27 12:56:39 +00:00
ad25b89af0
lang: ast: fix incorrect return types; add function to determine expression tokens
2024-11-27 12:56:10 +00:00
cd89c20beb
lang: ast: implement control flags returned by parser functions
2024-11-26 21:30:40 +00:00
740df312a9
lang: ast: remove redundant parse header
2024-11-26 21:30:09 +00:00
8cf341c063
doc: add really simple source file for parser testing
2024-11-26 13:10:52 +00:00
886c0b49a4
frontend: compile: parse source files
2024-11-26 13:10:36 +00:00
25e65f2107
frontend: repl: combine repl_full and repl_lex_only
2024-11-26 13:09:57 +00:00
5f5efd8d35
lang: ast: initial implementation of msg handler and selector parsing
2024-11-26 13:08:51 +00:00
27792c43b3
lang: ast: fix compiler warnings
2024-11-25 21:31:52 +00:00
8eb7eff274
frontend: repl: print ast once all tokens in the lex buffer have been consumed
2024-11-25 16:51:29 +00:00
f9b0096dd7
lang: ast: initial implementation of class parser
2024-11-25 16:50:42 +00:00
19506a299c
lang: ast: add nullptr check to ivy_ast_node_iterate
2024-11-25 16:50:12 +00:00
95321d7019
lang: ast: transparently ignore linefeeds if the current parse context doesn't handle them
2024-11-25 16:49:43 +00:00
dca0aba183
lang: ast: implement parsing 'use' statements
2024-11-25 16:49:07 +00:00
f1032f0c8e
lang: ast: move unit-package parser state definition to c file
2024-11-25 16:48:03 +00:00
f603551e26
lang: ast: fix compiler warnings
2024-11-24 21:31:49 +00:00
6fa1524766
frontend: repl: print the ast after each line of input
2024-11-24 20:50:32 +00:00
1e7e73db21
lang: ast: implement ast iteration
...
iteration is implementing without recursion, instead using type-specific callbacks to construct a queue of nodes to iterate through. ast priting is implemented using this functionality.
2024-11-24 20:50:12 +00:00
5622073252
frontend: repl: print and destroy ast nodes after parsing
2024-11-24 16:12:49 +00:00
fbef0b6743
lang: ast: add stub functions for retrieving, printing, interating, and destroying ast nodes
2024-11-24 16:12:31 +00:00
f524899da4
lang: lex: convert lexer token queue to b_queue
2024-11-24 16:12:06 +00:00
ab74c882d1
lang: ast: fill in stub functions for unit and unit-package
2024-11-24 16:11:33 +00:00
70aab9998b
lang: ast: add ast node size to ast_node_type
2024-11-24 11:52:59 +00:00
d43e387158
lang: ast: add state size to ast_node_type
2024-11-24 11:42:43 +00:00
f1ea916155
lang: ast: re-factor parser into multiple files
2024-11-24 11:11:06 +00:00
a25683ddc9
lang: lex: move all lex enums to their own value ranges
2024-11-24 11:10:27 +00:00
e71f6a0904
frontend: repl: pass user input through the parser
2024-11-23 19:28:26 +00:00
ed35011931
lang: ast: implement node, parser, and parser state management
2024-11-23 19:28:03 +00:00
b630aa009c
lang: lex: add function to check if tokens are available
...
if this function returns false, any attempt to read tokens from the lexer will cause another line of input to be retrieved from the lexer's line source.
2024-11-23 19:27:29 +00:00
54a0c331b2
common: add a status code for internal errors
2024-11-23 19:26:29 +00:00
5c5a2d236c
lang: ast: add stub parser functions
2024-11-23 10:15:40 +00:00
8219797cbb
cmake: don't link bluelib modules to their dependencies
...
this fixes duplicate library warnings given by ld, but still ensures that the user lists all dependent bluelib modules in their CMakeFiles.txt
2024-11-23 10:14:05 +00:00
6f06f42953
lang: add missing includes
2024-11-22 22:30:26 +00:00
f1be82c495
asm: add missing includes
2024-11-22 22:30:15 +00:00
ceb9f10b66
lang: add ast node definitions
2024-11-22 21:47:37 +00:00
90f96b6229
lang: lex: fix regular number characters not incrementing the token length
2024-11-21 20:05:13 +00:00
2d89db48d2
doc: standardise the use of braces, brackets, and parens in asm source
...
parens () are used to specify object parent (e.g. the name of the class
that a message handler belongs to)
braces {} are used to specify the contents of an object (e.g. the
getter/setter for a property)
brackets [] are used to specify the identifier of an object (e.g. the
selector for a message handler)
2024-11-20 22:15:14 +00:00
230e66e066
asm: lex: add left and right brace symbols
2024-11-20 22:15:10 +00:00
17ee2b6b57
frontend: switch to new bluelib tty interface
2024-11-20 22:14:35 +00:00
92f407ac09
lang: add colour to internal print functions
2024-11-20 22:14:11 +00:00
8df4592a6b
frontend: assemble: lex assembly file contents
2024-11-19 22:09:54 +00:00
adf4e38578
frontend: implement function for printing assembly lex tokens
2024-11-19 22:09:32 +00:00
4e8d6e8122
asm: implement asembly lexer
2024-11-19 22:08:58 +00:00