Commit Graph

  • 891d4304e0 Fix ordering of structs when array type appears, add more windows stuff Krzosa Karol 2022-06-15 09:08:10 +02:00
  • 5f9f1b9a63 Adding more resolved info to more calls Krzosa Karol 2022-06-14 21:45:07 +02:00
  • 7f5471de08 More resolved data in compound exprs, Fix invalid generation of compound exprs, Krzosa Karol 2022-06-14 21:41:41 +02:00
  • 58e919ef69 else if into elif Krzosa Karol 2022-06-14 21:25:02 +02:00
  • 44ee0f4351 Fix error when using default argument Krzosa Karol 2022-06-14 21:16:17 +02:00
  • a4513fcdfa Fix issue where compounds had not enough type information to typecheck Krzosa Karol 2022-06-14 20:42:32 +02:00
  • 107c8435b7 Add ';;' operator, more windows decls Krzosa Karol 2022-06-14 20:12:52 +02:00
  • 6e56b789e9 Update build script Krzosa Karol 2022-06-14 14:31:29 +02:00
  • e4e939ec04 Restructure Krzosa Karol 2022-06-14 14:28:29 +02:00
  • f223086ef3 Restructure Krzosa Karol 2022-06-14 14:28:21 +02:00
  • d63a327e3e Emitting proper lines and files, coding in the language! Krzosa Karol 2022-06-14 14:15:21 +02:00
  • f885abe3f5 -> Operator has very low precedence, size_of, align_of, length_of expressions Krzosa Karol 2022-06-14 13:50:59 +02:00
  • 17e342c4da Add resolved_type to Ast_Expr and remove from inheriting Krzosa Karol 2022-06-14 12:49:45 +02:00
  • 699ca4b18a Generating proper slice name when rewriting tree Krzosa Karol 2022-06-14 12:07:04 +02:00
  • 946e4082cc Working on slices, builtin stuff feels wanky, rewrite gen_simple_decl to generate string Krzosa Karol 2022-06-14 12:00:48 +02:00
  • f189ca381e Adding len() builtin and TYPE_SLICE Krzosa Karol 2022-06-14 09:33:46 +02:00
  • 1a6d2598a3 Fix spilling imports Krzosa Karol 2022-06-13 23:44:40 +02:00
  • bc3d3d00ca Writing to windows console through foreign calls! Krzosa Karol 2022-06-13 22:34:19 +02:00
  • c0253f0424 Add hex support Krzosa Karol 2022-06-13 22:14:31 +02:00
  • e73820c6f5 Compiling again, with double import, main and everything Krzosa Karol 2022-06-13 21:28:31 +02:00
  • 8260f2cc9a Fixing generated names when namespaced Windows :: #import calls and field accesses Krzosa Karol 2022-06-13 21:11:39 +02:00
  • ac84505d98 index on (no branch): 9523583 Fix function argument ordering Krzosa Karol 2022-06-13 21:11:39 +02:00
  • 95235836fd Fix function argument ordering Krzosa Karol 2022-06-13 21:01:22 +02:00
  • 3bbe5e5c2b Fixing generated names Krzosa Karol 2022-06-13 20:55:49 +02:00
  • 30f448a490 Fix codegen scope names Krzosa Karol 2022-06-13 20:35:45 +02:00
  • 2c431e3207 Writing more real program and squashing bugs Krzosa Karol 2022-06-13 20:22:40 +02:00
  • 955167ce18 Fixing bugs, prepending all names with context name Krzosa Karol 2022-06-13 18:07:17 +02:00
  • f9487a2c24 New cast '->' Krzosa Karol 2022-06-13 15:38:54 +02:00
  • 2503a6d680 Fix adding loads multiple times Krzosa Karol 2022-06-13 15:24:50 +02:00
  • a929e0b5ec Remove one of implicit arrays and still working Krzosa Karol 2022-06-13 15:05:47 +02:00
  • 4b16439a14 More work on modules, Ast_Module, Ast_File and Ast_Scope got unified Krzosa Karol 2022-06-13 14:04:47 +02:00
  • bcd825c154 New concept of AST_MODULE, Ast_File and Ast_Module are now both scopes. Concept of loading and importing. Krzosa Karol 2022-06-13 13:39:31 +02:00
  • 8bd5e9638f More module work Krzosa Karol 2022-06-13 12:01:28 +02:00
  • b0553c38cf New module scheme Krzosa Karol 2022-06-13 10:49:10 +02:00
  • cdaf85438e Package is Decl Krzosa Karol 2022-06-12 19:54:37 +02:00
  • 31c2c00452 Rearrange # flags, Add Windows.kl Krzosa Karol 2022-06-12 19:41:31 +02:00
  • cd29798c1d AST_STRICT for type aliases Krzosa Karol 2022-06-12 13:09:37 +02:00
  • beb10d6e2d Typesafe type aliases, first draft 100 lines and not working, second draw 2 lines and working 100% Krzosa Karol 2022-06-12 12:56:31 +02:00
  • 526967abbd token_match_pound Krzosa Karol 2022-06-12 12:14:15 +02:00
  • cd3098da45 Add char * which is supposed to work like in C and int Krzosa Karol 2022-06-12 11:58:36 +02:00
  • 4d6a8efd06 Compiling euler code with only link errors Krzosa Karol 2022-06-12 00:22:07 +02:00
  • 83130b130b First draft for adding c string type Krzosa Karol 2022-06-12 00:15:19 +02:00
  • 6a612cf1b4 Compounds for structs Krzosa Karol 2022-06-11 23:48:17 +02:00
  • e085bce77a type tests to file Krzosa Karol 2022-06-11 23:27:28 +02:00
  • 9ad5f695a4 Test new module idea, to first period is package name Krzosa Karol 2022-06-11 23:27:15 +02:00
  • 68663e650a Fixing codegen issues because of name resolution, invalid constants rewritten Krzosa Karol 2022-06-11 23:26:50 +02:00
  • 0fcdd02c5b Rewritten field access, lose functionality but I'm fine with it, it's simpler now, might need to support casting Krzosa Karol 2022-06-11 23:19:41 +02:00
  • ac371b7203 Fix bug where you could have same named decls Krzosa Karol 2022-06-11 10:01:31 +02:00
  • 3b4e14a089 Squashing compound bugs Krzosa Karol 2022-06-11 09:59:03 +02:00
  • b76b9c605a Compound arrays Krzosa Karol 2022-06-11 09:54:35 +02:00
  • bcddf7f721 Unify call and compound but have different kinds Krzosa Karol 2022-06-10 23:45:02 +02:00
  • 7365d6aa88 Basic compound parsing, maybe I should unify with calls again Krzosa Karol 2022-06-10 23:03:21 +02:00
  • cf1237f449 Fix big casting bug in CALL, euler.kl is working now too Krzosa Karol 2022-06-10 22:51:32 +02:00
  • 37e56a0914 Compiling global, work on AST_LAMBDA_EXPR Krzosa Karol 2022-06-10 22:06:35 +02:00
  • 480313b5fe Delete more old code Krzosa Karol 2022-06-10 21:48:34 +02:00
  • 2db6722406 Field access codegen works, properly converts to arrows Krzosa Karol 2022-06-10 21:46:14 +02:00
  • db7303a2c1 Deleting more code poggers Krzosa Karol 2022-06-10 21:40:56 +02:00
  • 9b03147099 Enum members have const syntax, enum members gen S64 type by default, Krzosa Karol 2022-06-10 21:36:36 +02:00
  • 862a820ec7 Fixing field access / Enum bugs Krzosa Karol 2022-06-10 19:44:52 +02:00
  • 70255c18cb Enums working Krzosa Karol 2022-06-10 19:41:10 +02:00
  • 43fe057cf4 Fixing fallout from temporary solution to field access Krzosa Karol 2022-06-10 19:31:59 +02:00
  • decab135b8 Referencing other packages works!! Krzosa Karol 2022-06-10 19:25:57 +02:00
  • eff0afd96c Delete old code Krzosa Karol 2022-06-10 18:08:38 +02:00
  • 4149300bb9 Cleanup, FLAG32 Krzosa Karol 2022-06-10 18:07:03 +02:00
  • ab663d0b01 Getting packages out of resolve_name Krzosa Karol 2022-06-10 17:07:58 +02:00
  • 957dbbd5cc Fix not top level ast's getting into ordered list. Delete parent nodes Krzosa Karol 2022-06-10 16:47:49 +02:00
  • 6ad5f4e706 Nicer error messages Krzosa Karol 2022-06-10 16:26:26 +02:00
  • 11e7bd52fd Solved the problem of scope when resolving out of order!!! Krzosa Karol 2022-06-10 16:23:34 +02:00
  • e2d07923c8 Add parent_scope on all nodes Krzosa Karol 2022-06-10 16:12:47 +02:00
  • 3402b4fe4d Add DECL_TYPE Krzosa Karol 2022-06-10 15:05:44 +02:00
  • 89b3e00ae4 Closer to old state Krzosa Karol 2022-06-10 14:08:27 +02:00
  • d5d9911f3e More work on packages Krzosa Karol 2022-06-10 11:05:08 +02:00
  • b0077fe9df Basic resolving, codegen with packages Krzosa Karol 2022-06-10 10:35:10 +02:00
  • fbe911d267 Complete rework, adding packages Krzosa Karol 2022-06-09 21:30:52 +02:00
  • 4edd2a4799 Big renames, prepare for scope changes Krzosa Karol 2022-06-09 17:45:30 +02:00
  • 2ec901f6da Big renames Krzosa Karol 2022-06-09 14:22:04 +02:00
  • 2f127dea98 Before adding pointer idea Krzosa Karol 2022-06-08 12:59:43 +02:00
  • 19356026fe More compile timers, euler3 Krzosa Karol 2022-06-08 10:04:34 +02:00
  • 87d6737a10 Working on euler using the compiler + squashing bugs Krzosa Karol 2022-06-08 09:53:13 +02:00
  • 5744da8899 Passing arrays as arguments to functions working Krzosa Karol 2022-06-07 21:34:02 +02:00
  • b65a5f78bf Working on arrays Krzosa Karol 2022-06-07 21:19:06 +02:00
  • c3e071b3bb Squashing lexer bugs related to EOF Krzosa Karol 2022-06-07 21:18:49 +02:00
  • c69d2b7fe2 Language actually gets properly stepped through using debugger! Krzosa Karol 2022-06-07 17:53:04 +02:00
  • 9cdc5ee6c9 Codegen basic arrays with size attached Krzosa Karol 2022-06-07 17:38:15 +02:00
  • ec89defb5d Fix type complete not called properly Krzosa Karol 2022-06-07 15:54:39 +02:00
  • 44d26d6939 Can call the compiler from command line with argument Krzosa Karol 2022-06-07 15:27:18 +02:00
  • 1a67fe3402 Require boolean in for, if Krzosa Karol 2022-06-07 13:50:16 +02:00
  • d45ee5ec8a Fix scope bug, fix parsing bug Krzosa Karol 2022-06-07 13:37:57 +02:00
  • af5865b059 Working on actually making a program Krzosa Karol 2022-06-07 12:10:20 +02:00
  • 759825172c Printf is working !! Krzosa Karol 2022-06-07 11:27:09 +02:00
  • a59283903b Add var args for using printf Krzosa Karol 2022-06-07 11:16:30 +02:00
  • b7df759d9d Add foreign functions Krzosa Karol 2022-06-07 09:56:19 +02:00
  • c5b82c0532 Added unary ++ --, prefix and postfix, working on running a program Krzosa Karol 2022-06-07 09:05:02 +02:00
  • d3da979d64 More for loop variations working Krzosa Karol 2022-06-06 23:55:44 +02:00
  • f852a23fcb Fixing bugs, pointer arithmetic checking, better for, working on first program Krzosa Karol 2022-06-06 23:50:38 +02:00
  • 729e7aee86 Fixing type checking Krzosa Karol 2022-06-06 22:14:30 +02:00
  • d042251c21 Bit Negating now works properly for different types Krzosa Karol 2022-06-06 17:14:42 +02:00
  • 7173557d26 Testing big ints Krzosa Karol 2022-06-06 17:00:01 +02:00
  • dc56bd54f3 Managing bigint memory Krzosa Karol 2022-06-06 16:49:41 +02:00
  • 06d6ec7525 Working on casts Krzosa Karol 2022-06-06 13:24:01 +02:00