Irmen de Jong
bc58a25765
allow sizeof(^^type) to return the size of a pointer
2025-08-02 11:33:15 +02:00
Irmen de Jong
9f6106452e
revert & to untyped pointer, added && for typed pointer address-of
2025-07-07 16:17:07 +02:00
Irmen de Jong
d5cc414221
Merge branch 'master' into structs
...
# Conflicts:
# codeOptimizers/src/prog8/optimizer/StatementOptimizer.kt
# compiler/src/prog8/compiler/astprocessing/CodeDesugarer.kt
# compilerAst/src/prog8/ast/antlr/Antlr2Kotlin.kt
# examples/test.p8
2025-06-02 20:52:50 +02:00
Irmen de Jong
0456badd02
creating on a new visitor-based antlr to kotlin translator
2025-06-02 01:18:07 +02:00
Irmen de Jong
d28f154f1c
Merge branch 'master' into structs
...
# Conflicts:
# examples/test.p8
# parser/src/main/antlr/Prog8ANTLR.g4
2025-06-01 17:53:41 +02:00
Irmen de Jong
a87f2640d3
fixed signed byte comparisons in case of overflowing values
2025-06-01 14:01:25 +02:00
Irmen de Jong
8e7bbcdbe0
clear syntax error for yet unsupported deref after array indexing
2025-05-29 21:14:38 +02:00
Irmen de Jong
8a0c02e264
Merge branch 'refs/heads/master' into structs
...
# Conflicts:
# codeCore/src/prog8/code/target/NormalMemSizer.kt
# codeCore/src/prog8/code/target/VMTarget.kt
# compiler/src/prog8/compiler/BuiltinFunctions.kt
# compilerAst/src/prog8/ast/antlr/Antlr2Kotlin.kt
# examples/test.p8
2025-05-29 13:42:16 +02:00
Irmen de Jong
3b1b0985c1
make sizeof(float) work, so you don't have to use sys.SIZEOF_FLOAT anymore etc.
...
define sys.SIZEOF_FLOAT in terms of sizeof(float)
2025-05-29 12:38:03 +02:00
Irmen de Jong
aaa81210ce
cleaning up pointer indexing
2025-05-25 02:56:32 +02:00
Irmen de Jong
c726d3f937
fix ptr errors
2025-05-19 22:49:07 +02:00
Irmen de Jong
11456496bd
Merge branch 'master' into structs
...
# Conflicts:
# compilerAst/src/prog8/ast/antlr/Antlr2Kotlin.kt
# parser/src/main/antlr/Prog8ANTLR.g4
2025-05-15 21:35:31 +02:00
Irmen de Jong
f5fc4e345c
fix build error on case-insensitive filesystems
2025-05-15 21:11:34 +02:00
Irmen de Jong
924e28e9b3
Merge branch 'master' into structs
...
# Conflicts:
# codeGenCpu6502/src/prog8/codegen/cpu6502/AsmGen.kt
# compiler/src/prog8/compiler/astprocessing/CodeDesugarer.kt
# compiler/src/prog8/compiler/astprocessing/SimplifiedAstMaker.kt
# compilerAst/src/prog8/ast/AstToSourceTextConverter.kt
# compilerAst/src/prog8/ast/antlr/Antlr2Kotlin.kt
# compilerAst/src/prog8/ast/walk/AstWalker.kt
# compilerAst/src/prog8/ast/walk/IAstVisitor.kt
# docs/source/todo.rst
# examples/test.p8
# parser/src/main/antlr/Prog8ANTLR.g4
2025-05-11 23:23:06 +02:00
Irmen de Jong
31c1bf8bc5
added on..goto/call statement
2025-05-11 21:37:44 +02:00
Irmen de Jong
8353c689ca
start making '&' (address-of) return a typed pointer, fixes some errors
2025-05-08 23:40:41 +02:00
Irmen de Jong
1ba5587404
allow syntax for declaring variables with struct instance type
2025-05-03 16:14:22 +02:00
Irmen de Jong
835c4b6da3
allow multi-field declarations in structs, get rid of . -> ^^ rewrite
2025-05-03 12:32:29 +02:00
Irmen de Jong
e0dea89477
added support for ptr[x].field
2025-05-02 22:16:20 +02:00
Irmen de Jong
c96e4b40d4
building syntax support for ptr[x].field
...
attempting to do this by making '.' an expression operator
2025-05-02 00:41:42 +02:00
Irmen de Jong
37da3e2170
parser
2025-05-02 00:41:42 +02:00
Irmen de Jong
696bf636ed
better parsing of directive names results in better error messages when an invalid one is found
2025-05-02 00:41:42 +02:00
Irmen de Jong
88269628a2
had to turn ^type syntax into ^^type to avoid confusion with the eor operator once again
2025-05-02 00:41:42 +02:00
Irmen de Jong
9c183f27eb
pointer dereferencing for chains
2025-05-02 00:41:42 +02:00
Irmen de Jong
8046023e82
pointer dereferencing for simple types (read and write)
2025-05-02 00:41:42 +02:00
Irmen de Jong
e328520588
initial struct and typed pointer support
2025-05-02 00:41:40 +02:00
Irmen de Jong
dd2d466350
code cleanups
2025-04-17 22:58:02 +02:00
Irmen de Jong
efd41260f2
added %jmptable
2025-02-09 15:02:59 +01:00
Irmen de Jong
ca9422bbe9
be able to parse multiple return values (sub + return)
2025-01-07 01:51:54 +01:00
Irmen de Jong
5482ac0302
simplify grammar of @tags, also improving their error message
2024-12-21 01:44:58 +01:00
Irmen de Jong
b01555d75e
cx16.set_screen_mode() no longer returns anything.
...
tweak when codegen slightly.
allow trailing comma in array literals.
set_screen_mode failure status is really uncommon and still returned by the real kernal routine screen_mode().
2024-12-19 20:56:07 +01:00
Irmen de Jong
3804fba0f1
moved jdk version config back to main gradle build file, version consistency
2024-12-19 13:39:27 +01:00
Irmen de Jong
e7a0cb636c
add $< and $> operators to get the lsb and msb addresses of a @split array respectively.
...
document the new split array things.
2024-12-16 17:45:54 +01:00
Irmen de Jong
80d88b3c61
fix many split array issues
2024-12-15 17:08:07 +01:00
Irmen de Jong
8f799567cf
make word arrays split by default (w.i.p.)
2024-12-15 08:12:34 +01:00
Irmen de Jong
cc59069876
allow goto to take any expression, not only an integer or an identifier (part 1)
2024-12-14 01:01:32 +01:00
Irmen de Jong
181f3e9eb1
remove the unary/prefix operators ^ and << again
2024-12-01 20:50:33 +01:00
Irmen de Jong
5c6bd9c091
register params support for normal subroutines
2024-11-24 15:56:54 +01:00
Irmen de Jong
cb86206698
added unary ^ and << operators (experimental) (gets bank and address of a long integer)
2024-11-24 03:07:18 +01:00
Irmen de Jong
844c97930f
fix Antlr grammar build and convert final build.gradle to build.gradle.kts (kotlin DSL)
2024-11-20 23:23:26 +01:00
Irmen de Jong
5c09dc10ae
convert build.gradle to build.gradle.kts (kotlin DSL)
2024-11-20 23:23:26 +01:00
Irmen de Jong
35c477b5a6
Make extsub address a (constant) expression instead of a numeric literal
...
this makes it easier to define API jump tables
2024-11-20 23:23:26 +01:00
Irmen de Jong
a874aec6a1
implementing const long
2024-11-20 23:22:56 +01:00
Irmen de Jong
fb0d9b46b0
remove 'romsub' as a recognised alternative for 'extsub'
2024-11-20 23:22:56 +01:00
Irmen de Jong
64164c1c72
changed @initonce to @dirty and meaning is now: not initialized at all.
2024-11-08 22:05:31 +01:00
Irmen de Jong
f89f1a84d0
@initonce variable tag to skip variable reinitialization
2024-11-08 19:03:48 +01:00
Irmen de Jong
9864abd393
romsub keyword is now extsub
2024-11-06 22:14:53 +01:00
Irmen de Jong
77e376f6bf
romsub @bank now also accepts a variable so the bank can be dynamic
2024-11-06 00:02:36 +01:00
Irmen de Jong
85e87dfe2e
consolidate @rombank and @rambank into just @bank
2024-11-03 21:15:11 +01:00
Irmen de Jong
155896c4c7
added @rombank and @rambank bank number tags on romsubs
...
on cx16 and c128 targets the compiler then automatically inserts a CALLFAR instead of a regular JSR to automatically do the bank switching.
2024-11-03 18:19:31 +01:00