Commit Graph

137 Commits

Author SHA1 Message Date
443af763f4 Trim excess blank lines before feeding to indent 2024-09-05 12:51:53 -04:00
d1b2e9f598 Disallow 'use' statements that aren't top level 2024-09-04 13:48:26 -04:00
61e482f6f3 Initial WIP first past 2024-09-02 18:47:39 -04:00
ad51b208b4 Overhaul of import syntax. Now everything uses use: use foo, `use
./foo.tm`, `use <foo.h>`, `use libfoo.so`
2024-08-22 14:02:48 -04:00
d08f795794 Partially working first draft of bigints 2024-08-13 01:30:25 -04:00
b2e752ee32 Replace heap_str with GC_strdup 2024-07-26 13:30:24 -04:00
cfe46ee393 Replace heap_strn() with GC_strndup() 2024-07-26 13:28:18 -04:00
87785555ec Fix for order of operations issues with enum and function typedef code 2024-07-23 19:46:42 -04:00
df765200c4 Switch to parallel compilation 2024-07-06 17:23:32 -04:00
a86dc05d36 Cache AST parsings so we don't have to re-parse files 2024-07-05 15:51:23 -04:00
c24a53174e Clean up symbol_renames.txt 2024-06-16 20:07:33 -04:00
28de9aeb84 Deprecate '-l' as a command line flag but instead support 'use -lblah' 2024-06-16 18:40:34 -04:00
4724d40e41 Support running with tomo -lfoo file.tm 2024-06-16 18:12:32 -04:00
32e82fdbe3 Remove some dead code and support -l as a tomo flag 2024-06-16 18:09:54 -04:00
9f8be0c502 Support library name as a separate environment field from namespace 2024-06-16 16:08:35 -04:00
7a53e10826 Fix issue with type namespaces not getting properly prefixed by library
namespace
2024-06-16 15:12:00 -04:00
6f11f5cbb4 Replace non-identifier characters with '_' when generating prefixes 2024-06-13 22:56:45 -04:00
ce66358d06 Add tomo -u foo to uninstall foo 2024-06-13 21:24:22 -04:00
81d55cacb7 Do dynamic library symbol prefixing using 'patchelf' 2024-06-13 21:20:50 -04:00
dab2c399f1 Split import/use into separate concepts 2024-06-13 13:17:51 -04:00
5757a5023c Support loading shared libraries 2024-06-13 12:59:19 -04:00
e9ba4411c9 Change default optimization level to whatever the C compiler's default
is
2024-06-11 13:37:33 -04:00
56b9684362 Make library name specifiable by a command line arg 2024-06-10 11:20:14 -04:00
77aa022df0 Change how tomo command line behavior works and how shared libraries are
built/installed.
2024-06-09 16:16:22 -04:00
39ac885125 Change c/header transpilation order and fix some issues 2024-06-08 14:39:52 -04:00
8c7d530080 Split header compilation into a separate function 2024-06-06 16:28:53 -04:00
11efaa6f8f Change how behavior is handled for running files with no main() func 2024-05-31 20:34:29 -04:00
913d8a538f Add -C cleanup flag and tweak where .so files get installed 2024-05-28 18:58:42 -04:00
94aa0620f2 Shared object files should create a .o first and then .so after 2024-05-28 02:50:01 -04:00
74eed9bc30 Better error checking 2024-05-28 02:38:14 -04:00
e382b5d2d9 Better error reporting 2024-05-28 02:35:21 -04:00
076ead369c Change default c compiler to 'cc' 2024-05-28 02:32:00 -04:00
8df8f5bb82 Changes to dependency tracking, compilation, and object linking 2024-05-28 00:30:09 -04:00
cb634f61f7 Remove unused code 2024-05-27 18:02:40 -04:00
c9889582a7 Fix up some import and -fPIC stuff 2024-05-27 17:45:22 -04:00
c35e5a84b9 Limited support for tomo -s to compile shared objects 2024-05-27 17:25:13 -04:00
6bd755eb24 Add support for $OBJFILES to allow linking extra object files, plus
don't scan for imports with .h files that aren't .tm.h
2024-05-27 16:25:08 -04:00
128b1dd239 Move standard initialization code into tomo_init() function 2024-05-25 13:56:34 -04:00
9d744b3e6e Include tweak 2024-05-25 13:04:59 -04:00
e439fcd1e2 Clean up imports a bit 2024-05-18 14:42:35 -04:00
a20f522fd6 Support space indents 2024-05-02 13:48:20 -04:00
e3ad5fdaaa Fix up some path issues during compilation/running/installation 2024-05-01 13:25:19 -04:00
aa66a38b08 Bugfix 2024-04-21 11:14:54 -04:00
2dd9392ef9 Fix USE_COLOR 2024-04-20 14:58:32 -04:00
ff3e1c1328 Move arg parsing to inline logic in main() function 2024-04-20 14:55:27 -04:00
e33aff908b Inline color file 2024-04-20 14:24:37 -04:00
98b93bb159 Remove (void)argc/v 2024-04-16 12:56:59 -04:00
c8e2f0faad Rudimentary stack traces 2024-04-13 15:20:42 -04:00
cc07637134 Tweak command line arguments (add -e and --help) 2024-04-12 14:36:25 -04:00
6c01eef851 Introducing the main() function 2024-04-12 13:09:31 -04:00
438edf45c2 Hook things up so the compiler can run better without installing 2024-04-03 03:08:40 -04:00
f5bd75295d Seed RNG on each run 2024-04-02 23:43:57 -04:00
838c9963fc Adding a REPL 2024-03-30 12:14:24 -04:00
04d9adc813 Switch naming convention to use '$' in symbols more 2024-03-29 12:54:31 -04:00
b327338772 Restructure things so autoformat isn't make-or-break 2024-03-26 13:20:47 -04:00
1c9d47c29f Print ASTs as XML instead of janky custom syntax 2024-03-24 19:04:57 -04:00
ad94012695 Check .c and .h file for staleness 2024-03-24 16:36:37 -04:00
42431a8742 Use $CC properly for running 2024-03-24 16:33:41 -04:00
b4a0cbf88b More flexible handling of command line arguments/environment variables 2024-03-24 16:26:07 -04:00
118517fb02 Add optimization flag 2024-03-24 16:19:59 -04:00
42f594cd7a Tweak compilation behavior 2024-03-24 16:11:11 -04:00
ddee869210 Stop if compilation error occurs 2024-03-22 13:47:30 -04:00
383586fdcc Fix relative import of own header file 2024-03-21 13:38:52 -04:00
80a7472545 Force retranspile target file 2024-03-21 13:35:41 -04:00
84f147e6ba Fix file mtime checks 2024-03-21 02:43:15 -04:00
ebf5626bfa Change what prints when 2024-03-21 02:29:46 -04:00
7c8338aedb Lazy compilation 2024-03-21 02:27:43 -04:00
9c9eff753f Break compilation phases into functions 2024-03-21 01:33:44 -04:00
adbb07fdc2 Module imports 2024-03-19 14:22:03 -04:00
df2e01c15e Add some better file comments 2024-03-18 12:47:07 -04:00
9a970964a5 Run with 'use' prefixed 2024-03-17 21:47:24 -04:00
594d58b6e2 When compiling .o files, put the .c and .h files on disk 2024-03-17 21:42:38 -04:00
2f409eebba Tweak autofmt behavior 2024-03-10 00:42:17 -05:00
7ad94e808d Add ld flag to find library 2024-03-10 00:05:32 -05:00
2b83ab279d Add langs to the language 2024-03-09 18:22:12 -05:00
9479b3937c Just use mathlib symbols, don't redefine them 2024-03-07 00:44:57 -05:00
080f3a4c2d Add '-c' compiler flag 2024-03-07 00:30:52 -05:00
8fab88c56f Rename Str -> Text 2024-03-03 18:15:45 -05:00
32f27b6206 Fix table literals 2024-03-03 16:08:38 -05:00
5486cdcedb Only put 'pragma once' in compiled header file 2024-03-03 15:22:22 -05:00
00e7ce2bd0 Remove dup output 2024-03-03 15:14:24 -05:00
ea7fcd85b4 Make load method be "use$name" 2024-03-03 15:04:36 -05:00
09b1d07d8b Clean up transpiling into separate .c/.h files 2024-03-03 14:45:36 -05:00
7237cac2e5 Add different compilation modes 2024-03-03 14:36:09 -05:00
5cbdf8fc61 Return correct exit status 2024-03-03 14:18:08 -05:00
ec75208980 Fix up some import issues and improve arrays to use saturating refcounts
instead of .copy_on_write
2024-02-29 12:37:09 -05:00
c2228bf986 Rename 'nextlang'->'tomo' 2024-02-24 16:06:49 -05:00