aca3c0c456
vim: add kebab-case identifier support
2025-11-07 09:54:50 +00:00
8150e218ee
frontend: debug: add support for printing negative number tokens
2025-11-07 09:54:33 +00:00
b0cbe42fc4
lang: lex: add support for kebab-case identifiers and negative numbers
...
identifiers can now contain hyphens, with the following restrictions:
* an identifier cannot start or end with a hyphen.
* an identifier cannot contain more than one hyphen in a row.
kebab-case identifiers can be used for type and variable names, as well
as message identifiers and labels.
to avoid ambiguity, the lexer now enforces whitespace around most binary
operators (with a few exceptions, such as semicolons). trying to
compile a "compact" arithmetic expression, such as
y=1+2
will now result in a "missing whitespace" error.
2025-11-07 09:49:29 +00:00
1a544b6411
lang: add a diag for missing whitespace around a binary op
2025-11-07 09:49:24 +00:00
24eef25147
frontend: update bluelib api usage
2025-11-06 10:39:08 +00:00
9622e30e0f
diag: update bluelib api usage
2025-11-06 10:38:58 +00:00
6d172e1dc0
mie: update bluelib api usage
2025-11-06 10:38:50 +00:00
06f384e089
asm: update bluelib api usage
2025-11-06 10:38:40 +00:00
4386965cd9
lang: update bluelib api usage
2025-11-06 10:38:32 +00:00
b26c37c349
common: update bluelib api usage
2025-11-06 10:38:23 +00:00
faa9200bb1
cmake: update FindBluelib module
2025-11-05 22:39:22 +00:00
8bb734d882
doc: sample: add match-statement syntax and ir samples
2025-11-04 10:38:34 +00:00
02b21126b5
doc: sample: add comma separators between complex-msg args
2025-11-04 10:38:16 +00:00
58fa746aa1
lang: add match-expression parser/generator
2025-11-04 10:35:52 +00:00
b444a565a2
lang: operator: define range and range-inclusive operators
2025-11-04 10:35:12 +00:00
b37c7d3303
lang: lex: add range operator symbols
2025-11-04 10:34:35 +00:00
7bb4803b9e
lang: codegen: implement cascade operator generation
2025-09-12 10:01:07 +01:00
8541b3bc5b
lang: codegen: msg generator can now accept recipient as a param rather than parsing it from the ast
2025-09-12 10:00:06 +01:00
b255b2c8c6
frontend: compile: refactor and cleanup compilation pipeline
2025-09-08 16:28:14 +01:00
39a1f042a2
frontend: disassemble: update ivy_opcode enum references
2025-09-08 16:27:41 +01:00
364d313c22
frontend: debug: add colours for new token and node types
2025-09-08 16:27:21 +01:00
bd0e60e209
lang: codegen: add generator for global variable declarations
2025-09-08 16:26:55 +01:00
c442e53ffe
lang: codegen: implement while-loop code generation
2025-09-08 16:26:12 +01:00
8425e2db4b
lang: codegen: implement for-loop code generation
2025-09-08 16:25:54 +01:00
68ca789e43
lang: codegen: cond: implement implicitly returning values from an if-else expression
2025-09-08 16:24:29 +01:00
42dd3ffffc
lang: codegen: cond: fix gen_block not repeating the block node
2025-09-08 16:24:03 +01:00
84e6d4f2ed
lang: codegen: expr: implement assignment and arithmetic-and-assign operator support
2025-09-08 16:22:37 +01:00
97f7782968
lang: codegen: expr: implement generating true/false/null constants
2025-09-08 16:22:06 +01:00
312e737f9f
lang: codegen: implement returning the last value evaluated in a block
2025-09-08 16:21:05 +01:00
168310033d
lang: codegen: implement variable declaration/resolution support in block generator
2025-09-08 16:20:41 +01:00
6844f498c5
lang: codegen: replace codegen_value with a new system for passing different types of values between code generators
2025-09-08 16:17:29 +01:00
7ee2e9dd81
lang: codegen: fix block code generator using unit_codegen_state
2025-09-08 16:10:47 +01:00
e5ea7b1134
lang: codegen: remove old var declaration generator
2025-09-08 16:10:11 +01:00
ee402fb437
lang: move IVY_OP_ASSIGN operator id to be with the other assignment operators
2025-09-08 16:03:45 +01:00
3b5f08b1ea
lang: ast: add new ast node type ids
2025-09-08 16:03:39 +01:00
7d1b7c5d68
lang: lex: add new lex token type ids
2025-09-08 16:03:26 +01:00
6e65349d70
lang: ast: fix some source formatting
2025-09-08 16:01:02 +01:00
d95a544ff2
lang: ast: fix parsing of tuple iterator declaration in for-loops
2025-09-08 16:00:42 +01:00
59a85e9c47
lang: ast: fix parsing of unlabelled complex msg args
2025-09-08 16:00:07 +01:00
6dfa0c7e17
lang: ast: add function to signal the end of token input to the parser
2025-09-08 15:58:14 +01:00
3c72527204
lang: ast: fix parsing of inline-if expressions that immediately precede an end keyword
2025-09-08 15:57:04 +01:00
8ab377b3ab
lang: ast: implement parsing of true/false/null keyword constants
2025-09-08 15:56:03 +01:00
bf250179da
lang: ast: implement parsing of break/continue loop-control statements
2025-09-08 15:55:12 +01:00
84e52b1649
lang: ast: replace var keyword with global
...
local variables are now created automatically when they are first assigned to.
the global keyword can be used to declare that a name refers to a global variable instead,
at which point, assigning to the name results in the assignment referencing the global variable
instead of allocating a new global variable.
2025-09-08 15:52:29 +01:00
5ea544692b
lang: diag: add some new diag codes and messages
2025-09-08 15:48:38 +01:00
ea42f738df
asm: implement a mie backend for ivy assembly generation
2025-09-08 15:47:48 +01:00
9f8bdc9365
asm: update references to enum ivy_opcode
2025-09-08 15:47:16 +01:00
4e8b1c15de
common: rename instruction opcode enum names to avoid conflict
2025-09-08 15:46:44 +01:00
48fb330f47
common: re-define status codes to be compatible with b_result
2025-09-08 15:43:29 +01:00
eb260fb35c
mie: select: add support for target-specific nodes and lowering operations
2025-09-08 15:42:22 +01:00