Commit graph

575 commits

Author SHA1 Message Date
Wolfgang (Blub) Bumiller
c2364567de allow a semicolon after function bodies - make it mandatory with -std=qcc 2012-08-14 14:38:02 +02:00
Wolfgang (Blub) Bumiller
51719db2cf actually print the prototype's file+line, not the current one 2012-08-14 14:19:44 +02:00
Wolfgang (Blub) Bumiller
65fb4b34b5 type comparison, function prototypes 2012-08-14 14:14:56 +02:00
Wolfgang (Blub) Bumiller
e35a26a9e1 the error about an already-declared variable should display the place its been previously declared at 2012-08-14 13:50:55 +02:00
Wolfgang (Blub) Bumiller
5ef88dbda7 removed redundant error+file+line in parseerror() 2012-08-14 13:15:55 +02:00
Wolfgang (Blub) Bumiller
722be55fa9 removing all direct 'printfs' from ast and ir, replaced by the error interface 2012-08-14 13:14:32 +02:00
Wolfgang (Blub) Bumiller
36591e902b it's .file, not .name' 2012-08-14 12:17:34 +02:00
Wolfgang (Blub) Bumiller
5416fdb7c0 renamign 'errtype' to 'msgtype' here... makes more sense... plus I had it on the paramlist :P 2012-08-14 12:17:08 +02:00
Wolfgang (Blub) Bumiller
965331f315 oops... removing wrongly placed semicolons 2012-08-14 12:15:05 +02:00
Wolfgang (Blub) Bumiller
d824645019 error-print functions which take lex_ctx 2012-08-14 12:06:28 +02:00
Wolfgang (Blub) Bumiller
5f0111c114 And a colon for the colored version too ... 2012-08-14 12:00:09 +02:00
Wolfgang (Blub) Bumiller
0a27cc13c8 Add a colon after the linenumber 2012-08-14 11:54:48 +02:00
Wolfgang (Blub) Bumiller
104e9bce92 don't add the general 'parse error' message if an error has already been printed 2012-08-14 11:54:27 +02:00
Wolfgang (Blub) Bumiller
4dad7c7d50 used the wrong va_list there... why didn't gcc warn about this being uninitialized... 2012-08-14 11:54:06 +02:00
Wolfgang (Blub) Bumiller
579ac3dd5d Working towards a saner error-output system, adding -Werror 2012-08-14 11:34:07 +02:00
Wolfgang (Blub) Bumiller
c08966a2a4 remove now unused files 2012-08-14 10:57:09 +02:00
Wolfgang (Blub) Bumiller
82d9651529 Merge branch 'master' into blub/parser 2012-08-14 10:42:34 +02:00
Wolfgang (Blub) Bumiller
cfdf915b25 ast_binstore, used for +=, -=, ++, -- etc 2012-08-14 10:40:48 +02:00
Wolfgang (Blub) Bumiller
3fd7a64b45 storing generated values and returning them early if they exist - will error when that doesn't make sense eg when trying to call codegen ast_ifthen more than once 2012-08-13 19:54:53 +02:00
Wolfgang (Blub) Bumiller
862b506dcd initialize ast_expression_common.outl/outr 2012-08-13 19:40:06 +02:00
Wolfgang (Blub) Bumiller
406a32bea6 prototypes for ast_binstore, and storing outl/outr in ast_expression_common, TODO: let ast_codegen functions reuse previous results so that binstore can call codegen twice 2012-08-13 19:39:35 +02:00
Wolfgang (Blub) Bumiller
69d9afbc69 while, for 2012-08-13 17:10:13 +02:00
Wolfgang (Blub) Bumiller
1c4a11f6fb factored out 'if' parsing code into a function, added 'while' parsing, and errors for more unsupported operators 2012-08-13 16:45:35 +02:00
Wolfgang (Blub) Bumiller
5ca3fed36a Even more operators 2012-08-13 15:33:32 +02:00
Wolfgang (Blub) Bumiller
e3b3c2efe3 Merge branch 'master' into blub/parser 2012-08-13 15:25:40 +02:00
Wolfgang (Blub) Bumiller
633561a730 type_eq_instr[], type_ne_instr[] 2012-08-13 15:25:14 +02:00
Wolfgang (Blub) Bumiller
d8890fda9e More operations 2012-08-13 15:24:55 +02:00
Wolfgang (Blub) Bumiller
5390b2d7c2 nicer error messages, bitand and bitor for floats allowed 2012-08-13 15:13:43 +02:00
Wolfgang (Blub) Bumiller
9f151e82df Check types on + and - operations 2012-08-13 15:09:27 +02:00
Wolfgang (Blub) Bumiller
5680c661a6 adding missing initializer for ir_value's member array 2012-08-12 21:56:53 +02:00
Wolfgang (Blub) Bumiller
c7cca404dc after a closing paren another operator has to be expected again 2012-08-12 20:21:21 +02:00
Wolfgang (Blub) Bumiller
fb8a9b3ccf some debug outputs which can be activated via a define, fixing a bug where the shunting yard tries to apply operators when there are none left 2012-08-12 20:13:14 +02:00
Wolfgang (Blub) Bumiller
f2bbffbd4b return an error code at exit after compile errors 2012-08-12 20:12:32 +02:00
Wolfgang (Blub) Bumiller
6806fd1e86 it's a member of entity, not of a field... 2012-08-12 19:29:18 +02:00
Wolfgang (Blub) Bumiller
6409bf455f -std=gmqcc way to handle fields by 'namespace' 2012-08-12 19:24:08 +02:00
Wolfgang (Blub) Bumiller
ae73332832 without -std=gmqcc fields are accessible anywhere where globals are 2012-08-12 19:02:52 +02:00
Wolfgang (Blub) Bumiller
fd1a850629 Recognize a dot as operator when not in 'no-ops' mode in the lexer 2012-08-12 19:00:44 +02:00
Wolfgang (Blub) Bumiller
437988c5b4 don't rewind local variables too far 2012-08-12 18:58:46 +02:00
Wolfgang (Blub) Bumiller
0c06f9f650 Merge branch 'master' into blub/parser 2012-08-12 18:45:22 +02:00
Wolfgang (Blub) Bumiller
60a5d8ab4f print error and return NULL when trying to create an invalid member access 2012-08-12 18:44:58 +02:00
Wolfgang (Blub) Bumiller
067294a470 Merge branch 'master' into blub/parser 2012-08-12 11:39:52 +02:00
Wolfgang (Blub) Bumiller
fc7d32a715 fixed: ast_member needs to allow type_vector instead of type_float as base 2012-08-12 11:39:43 +02:00
Wolfgang (Blub) Bumiller
b2f13ebc5e Merge branch 'master' into blub/bc3 2012-08-12 11:36:41 +02:00
Wolfgang (Blub) Bumiller
028543db8c ast_binary now keeps track of types 2012-08-12 11:36:28 +02:00
Wolfgang (Blub) Bumiller
5240aa8379 ast_istype should add the TYPE_ prefix 2012-08-12 11:36:15 +02:00
Wolfgang (Blub) Bumiller
7e3edea621 fixing the messup of MUL_FV and _VF being swapped - getting rid of additions that really have no place here (YET) (matrix/quaternion types) 2012-08-12 11:34:55 +02:00
Wolfgang (Blub) Bumiller
647582aeb4 merging master 2012-08-12 11:28:52 +02:00
Wolfgang (Blub) Bumiller
b968927074 default case for ir_value_dump's type switch 2012-08-12 11:28:18 +02:00
Wolfgang (Blub) Bumiller
c3cbda8b2b ir_instr_dump to print CALL+paramcountfor calls rather than CALL0 always 2012-08-12 10:19:33 +02:00
Wolfgang (Blub) Bumiller
93d372f222 TYPE_FUNCTION in ir_value_dump to show '(function)' rather than '(void)' 2012-08-12 10:15:27 +02:00