This website requires JavaScript.
b9569c7df6
add missing semicolong since a destructor call is now a statement
nitrix
2020-03-05 22:08:20 +01:00
86fe676492
rename method to match new grammar
nitrix
2020-03-05 22:05:25 +01:00
64634a0d4d
move destructor call from expressions to statements
nitrix
2020-03-05 22:05:00 +01:00
3fb350ad31
make destructor call inherit from statement
nitrix
2020-03-05 22:04:27 +01:00
d89c085ecc
implement context analysis for destructor node
nitrix
2020-03-05 16:23:10 +01:00
9300e37fca
implement node visitors for the destructor node
nitrix
2020-03-05 16:22:53 +01:00
995fac20c5
create node that represents a destructor call
nitrix
2020-03-05 16:22:27 +01:00
31460860d5
add a destructor call to the grammar
nitrix
2020-03-05 16:21:11 +01:00
441466c83f
next time check before commiting everything...
nitrix
2020-02-14 14:19:13 +01:00
80deae6971
implement visitors for null atom
nitrix
2020-02-14 14:11:26 +01:00
2f425944e5
implement null node
nitrix
2020-02-14 14:11:10 +01:00
8ebbd6ae54
implement null type
nitrix
2020-02-14 14:10:48 +01:00
9d83e5425d
add a null literal
nitrix
2020-02-14 14:10:23 +01:00
5c0459c5a2
implement constructor call, eval and genasm are still stubs
nitrix
2020-02-14 13:06:20 +01:00
317c2c52ca
add constructor call expression to the grammar
nitrix
2020-02-14 13:05:34 +01:00
19daaa63af
use GetStructNames instead of collecting the names in GetStructs
nitrix
2020-02-04 21:44:04 +01:00
a79a2332a1
implement visitor to collect all struct names
nitrix
2020-02-04 21:43:22 +01:00
f0b6f052d6
implement pretty print for struct field access expression
nitrix
2020-02-04 21:34:28 +01:00
1ca3f5ca8b
implement context analysis for struct field access expressions
nitrix
2020-02-04 21:30:17 +01:00
6a7eb8fde2
make GetStructs collect the complete struct definitions
nitrix
2020-02-04 21:29:25 +01:00
a969aa895f
make GetStructs collect the complete struct definitions
nitrix
2020-02-04 21:28:52 +01:00
fef397c60d
implement empty visitors
nitrix
2020-02-04 21:26:23 +01:00
e873e211c9
implement node for struct field access expression
nitrix
2020-02-04 21:25:27 +01:00
304891adb8
add struct field access expression
nitrix
2020-02-04 21:24:56 +01:00
233894fbcf
remove NYI errors, check if a struct is defined if the declared type is not primitive
nitrix
2020-02-04 19:48:38 +01:00
6981c288e6
implement context analysis
nitrix
2020-02-04 19:21:34 +01:00
33904a3c33
implement pretty print visitor
nitrix
2020-02-04 19:21:06 +01:00
279ea28a29
add empty stubs for the visit method of the new nodes
nitrix
2020-02-04 19:20:48 +01:00
15c55ed065
add the new nodes to the list of visitable nodes
nitrix
2020-02-04 19:19:57 +01:00
309fe39c01
implement get vars visitor
nitrix
2020-02-04 19:19:20 +01:00
fd7f7c39bb
implement a visitor that collects the names of all structs that were defined
nitrix
2020-02-04 19:17:13 +01:00
b5086b44f0
return a struct type if no primitive type with the given name was found
nitrix
2020-02-04 19:16:41 +01:00
e971b8b91e
create a new type class that represents the type of a struct
nitrix
2020-02-04 19:15:59 +01:00
6f8c995f19
create DAST nodes for structDefinition and structField
nitrix
2020-02-04 19:14:40 +01:00
3e8e30e0da
add struct definitions as a direct child of program
nitrix
2020-02-04 19:13:45 +01:00
e297a7d2e8
Merge branch '25-floats' into 'master'
Dennis Kaiser
2020-03-06 00:36:10 +01:00
333475f27b
implement integer division tests
nitrix
2020-03-05 17:21:08 +01:00
a8b093a005
reenable the mod test for -1, -1
nitrix
2020-03-05 17:13:36 +01:00
1530dc6c55
sign extend rax into rbx before calling idiv, the replaces the rbx zeroing
nitrix
2020-03-05 17:13:19 +01:00
09eec634b1
add new mixdiv test for -1, -1
nitrix
2020-03-05 16:50:37 +01:00
150e18e05b
inspec type of expression instead of the type of the assignment, since the assignment type is always null
nitrix
2020-03-05 16:40:31 +01:00
ebeabfe930
fix input values to match expected value
nitrix
2020-03-05 16:39:47 +01:00
bba950c851
25: Fix tests
Marvin Kaiser
2020-03-05 12:31:09 +01:00
cbc8020e81
25: Rewrite prepareRegisters, correct operator order for comparisons
Marvin Kaiser
2020-03-05 09:06:22 +01:00
58cdaf04dd
25-Add more tests for floats
Marvin Kaiser
2020-03-05 07:58:16 +01:00
229920946d
25- Strict check between function signature and function call
Marvin Kaiser
2020-03-04 20:53:50 +01:00
18cfbdcbb5
implement function call tests for floats and floats mixed with integers
nitrix
2020-03-04 20:46:49 +01:00
384d98418d
implement math tests for floats
nitrix
2020-03-04 20:46:08 +01:00
6eb61f905f
25: Add logic for handling float in function calls
Marvin Kaiser
2020-03-04 19:29:24 +01:00
0316a7d4bf
25: Start adding Float Type
Marvin Kaiser
2020-03-03 20:45:55 +01:00
db8146ed8a
Merge branch '28-static-type-check-bug-with-if-clause-in-function' into 'master'
Marvin Kaiser
2020-02-04 12:07:03 +01:00
a9db8b3f9a
set the initialited field of class VariableDeclaration, make sure a variable has been inizialized prior to its usage
nitrix
2020-02-04 12:02:41 +01:00
1bb53a0bcf
add field 'initialized' to class VariableDeclaration
nitrix
2020-02-04 12:02:15 +01:00
e00b72a32d
Merge branch '20-update-readme' into 'master'
Marvin Kaiser
2020-02-04 11:46:35 +01:00
1e2dee3f1d
add a section that showcases the static type system
nitrix
2020-02-04 11:35:00 +01:00
1ae404b978
always add the declared type as the type of a variable declaration. do not use the combined type as the type of the variable that is declared
nitrix
2020-02-04 11:21:48 +01:00
269cf302df
Merge branch '17-line-and-block-comments' into 'master'
Marvin Kaiser
2020-02-04 11:11:06 +01:00
d3a4af0b8c
add lexer rules for line and block comments
nitrix
2020-02-04 11:02:34 +01:00
47390f6757
add missing type declarations to pretty print output
nitrix
2020-02-04 00:16:00 +01:00
974baebfe9
Merge branch '13-fix-eval-visitor' into 'master'
Dennis Kaiser
2020-02-04 00:16:04 +01:00
e978b4d52c
remove unused import
nitrix
2020-02-04 00:07:56 +01:00
26b1406013
make boolean and comparison expression evaluate to bool, user asBoolean when expecting a boolean, re-welcome the conditions of loops everytime another step has to be evaluated
nitrix
2020-02-04 00:07:22 +01:00
56463c3e30
the the result of eval as an object and call toString\(\) on it
nitrix
2020-02-03 23:42:49 +01:00
fc33ab6b12
add method to get the raw value representation
nitrix
2020-02-03 23:42:07 +01:00
d5610b0c3f
Merge branch 'feature/better-errors' into 'master'
Dennis Kaiser
2020-02-03 23:50:49 +01:00
f3c5bac860
check whether the types of the operants of an equality expression can combine instead of enforcing them to both be integers
nitrix
2020-02-03 23:45:52 +01:00
e8f80eb2f9
make file pretty
nitrix
2020-02-03 22:59:17 +01:00
018ce8712a
add error message prefix to type missmatch errors, staticly assign bool type to boolean expressions
nitrix
2020-02-03 22:56:40 +01:00
6f0a3754bd
check whether the body of a function guarantees a return value and throw an exception if not
nitrix
2020-02-03 22:36:24 +01:00
7c56f401ac
add error prefix to the runtime exception message
nitrix
2020-02-03 22:28:37 +01:00
02fb7b7cc2
unify error message appearance
nitrix
2020-02-03 22:28:21 +01:00
3a89ab2231
remove error handling, since these kinds of errors are caught by our context analysis
nitrix
2020-02-03 22:24:27 +01:00
3e8a904cb8
catch error to abort further processing
nitrix
2020-02-03 22:21:30 +01:00
cb0d63a71c
save the line and column of the corresponding token, generate an error prefix for every thrown error
nitrix
2020-02-03 22:20:59 +01:00
12c1f75602
add fields to save the line and column in which the token corresponding to the node was found
nitrix
2020-02-03 22:20:25 +01:00
33cbae0eeb
implement method to generate an error prefix that mentions the line and column the error occured in
nitrix
2020-02-03 22:19:36 +01:00
5ed294965c
Merge branch '22-operatorenprazedenz' into 'master'
Dennis Kaiser
2020-02-03 22:10:42 +01:00
ea2115e4c3
Merge branch '18-add-possibility-to-pass-input-file-and-output-filename' into 'master'
Dennis Kaiser
2020-02-03 22:08:24 +01:00
69f44a2867
Added possibility to pass filenames for input / output
Marvin Kaiser
2020-02-03 17:16:27 +01:00
34253a70ba
Implement operator precedence with and without parenthesis
Marvin Kaiser
2020-02-03 16:35:29 +01:00
a2c9625691
Merge branch '1-grammatik-typinformationen-hinzufugen' into 'master'
Marvin Kaiser
2020-01-27 17:05:26 +01:00
3fb30ebd7e
print statement never has a type
nitrix
2020-01-27 17:02:21 +01:00
fa8904e0f5
fix type annotation for comparison expressions
nitrix
2020-01-27 16:57:09 +01:00
86468ea740
Fix correct type name access
Marvin Kaiser
2020-01-27 16:47:16 +01:00
b1be18f367
Fix function type addition for if statement
Marvin Kaiser
2020-01-27 16:47:00 +01:00
db7331911a
Added functionality to analyze AST for all defined functions
Marvin Kaiser
2020-01-27 16:04:38 +01:00
0aed4ee893
my initial short for typechecking, still very unifinished tho
nitrix
2020-01-21 00:21:54 +01:00
e940100ec1
Merge branch 'feature/add-bool-literal' into 'master'
Dennis Kaiser
2020-01-20 19:40:08 +01:00
e5baad62e6
implement tests
nitrix
2020-01-20 19:33:07 +01:00
295bcaec8a
implement visitors for boolean expressions
nitrix
2020-01-20 19:32:50 +01:00
722a9babcb
remove unused import
nitrix
2020-01-20 19:32:16 +01:00
d27df13ec1
added boolean operators
Marvin Kaiser
2020-01-20 16:01:25 +01:00
1186bb4550
add bool literal
nitrix
2020-01-20 15:26:55 +01:00
1095d9dd83
Correct spelling errors in README.md
Marvin Kaiser
2020-01-20 12:39:56 +01:00
11c8759dfd
Added project summary to readme
Marvin Kaiser
2020-01-14 19:15:58 +01:00
15128a8d75
updae makefile to use --no-main
Marvin Kaiser
2020-01-14 18:43:03 +01:00
34d0e1bb0e
Added cli argument to either generate main method or not
Marvin Kaiser
2020-01-14 18:37:34 +01:00
5275b63940
added make target to only cleanup the tests. Can be used for quicker test development without having to recompile the klang compiler
Marvin Kaiser
2020-01-14 12:25:04 +01:00
7af6565e07
Added more tests for while
Marvin Kaiser
2020-01-14 12:24:25 +01:00
3ca9fe4de1
Added automatic counting of successes/failures in tests
Marvin Kaiser
2020-01-14 12:15:20 +01:00