665 Commits

Author SHA1 Message Date
Stone Tickle
b9b305dd17
remove local keyword 2023-12-06 21:39:23 -05:00
Stone Tickle
d9388848eb
add analyze -d 2023-12-06 16:37:15 -05:00
Stone Tickle
8973302295
add analyze -t 2023-12-06 16:36:26 -05:00
Stone Tickle
ed4e516dc7
reimplement dict_del 2023-12-06 16:31:51 -05:00
Stone Tickle
0010f5f451
wip optimize dicts with hash map backing 2023-12-06 09:10:00 -05:00
Stone Tickle
883594c470
reuse identical strings 2023-12-04 21:17:26 -05:00
Stone Tickle
ea05cc0cbb
add some tracy annotations 2023-12-01 11:16:09 -05:00
Stone Tickle
acd88ddf23
add dict delete 2023-11-30 13:12:20 -05:00
Stone Tickle
d7dff4b44c
obj array more functions and fix when deleting end 2023-11-29 22:26:21 -05:00
Stone Tickle
b6545fc75e
make logging objects easier 2023-11-29 22:25:33 -05:00
Stone Tickle
4a79d17741
more scope work 2023-11-28 11:40:15 -05:00
Stone Tickle
7e99abc43e
working on scopes 2023-11-27 21:29:17 -05:00
Stone Tickle
9cb9d858c9
lots of small changes
- wip "unencapsulated" module.  This just means that the module is
  loaded into the global scope.  You could then write functions like
  `vcs_tag` in this global module to be used by all meson files.  This
  might be removed.
- remove export() function and instead use a lua-like return to export
  from the module.
- track language mode in function definitions.  Necessary for functions
  to use internal-only functions.
- use assigned function name in error messages
- fix embedded source reopening in error messages
- reduce number of node types that get marked as dead code
- create true/false bools on workspace initialization with known ids.
  Future code should use these rather than making new boolean objects to
  save memory.
- add a new test script-module
2023-11-27 12:45:53 -05:00
Stone Tickle
2afcdbdacb
restrict modules to embedded modules
also alter function syntax
2023-11-25 20:45:55 -05:00
Stone Tickle
0deb94b745
add extended lang mode 2023-11-19 20:37:31 -05:00
Stone Tickle
46c544692a
rename func_impl_name to func_impl 2023-11-19 13:41:32 -05:00
Stone Tickle
5e1c455cbc
more progress 2023-11-17 22:39:51 -05:00
Stone Tickle
4a0272972e
more flexible functions 2023-11-15 21:54:30 -05:00
Stone Tickle
949c2cf44c
rename datastructures 2023-11-12 11:04:23 -05:00
Seedo Paul
757c93ebf8
add helper to parse json to obj_dict
Signed-off-by: Seedo Paul <seedoeldhopaul@gmail.com>
2023-11-11 20:47:55 -05:00
Seedo Paul
b173a8a25e
mod/python: fix method lookup tables
`python_installation` is an `external_program` and not the module
`python`.
2023-10-29 08:05:19 -04:00
Stone Tickle
6416305a94
reformat and fix issues with python module changes
- fix python3.find_python return type
- fix missing interp_args for language_version()
- add missing run_cmd_ctx_destroy
2023-10-19 22:34:37 -04:00
Filipe Laíns
118134e531
python: implement python_installation.language_version
Signed-off-by: Filipe Laíns <lains@riseup.net>
Signed-off-by: Seedo Paul <seedoeldhopaul@gmail.com>
2023-10-19 22:33:54 -04:00
Filipe Laíns
50ce7d9053
object: add python_installation
python_installation is an external_program with a couple of extra
methods related to the Python installation. Right now, we only add the
type.

Signed-off-by: Filipe Laíns <lains@riseup.net>
Signed-off-by: Seedo Paul <seedoeldhopaul@gmail.com>
2023-10-19 22:33:54 -04:00
Vincent Torri
6705f56dbd
cmd_test.c: add timer functions for POSIX and Windows
fix compilation with cl.exe
2023-10-19 21:59:34 -04:00
Stone Tickle
340c63a6f0
fix header guard 2023-10-14 22:09:18 -04:00
Filipe Laíns
9078f648eb
util: move MIN and MAX macros to a new util.h header
Signed-off-by: Filipe Laíns <lains@riseup.net>
2023-10-14 21:53:41 -04:00
Stone Tickle
074f34e91c
support cmd_array for external_program
This will be required for find_program('meson') to return an external
program with the command ['muon', 'meson'].  It also allows muon to
return ['muon', 'samu'] as the result for find_program('ninja'), which
is kind of neat.
2023-10-09 10:04:57 -04:00
Seedo Paul
88230c7884
implement pkgconfig_define key in dep.get_variable
Signed-off-by: Seedo Paul <seedoeldhopaul@gmail.com>
2023-10-06 07:52:52 -04:00
Stone Tickle
d2966a3f4c
implement project(license_files:) 2023-10-03 13:35:25 -04:00
Stone Tickle
5de4d811b7
implement declare_dependency(objects:) 2023-10-03 13:35:25 -04:00
Stone Tickle
66fd5ee205 windows: set standard streams to O_BINARY
This prevents things like muon fmt mangling newlines in files.  Further
consideration will be required when people decide they actually want
muon fmt to output crlfs.
2023-07-11 16:57:30 -04:00
Vincent Torri
8f77e55b47
Add cl and clang-cl compilation support 2023-07-11 16:55:18 -04:00
Stone Tickle
314b4c864d
set object file extension from compiler 2023-06-02 21:45:27 -04:00
Stone Tickle
dc432474c0
muon fmt: editorconfig support 2023-04-24 19:40:10 -04:00
Stone Tickle
93c59efa9e
support -Dwarning_level=everything 2023-04-10 07:17:00 -04:00
Stone Tickle
2a24e9f7e7
support in operator for strings
In order to accomplish this, memmem from musl was vendored.  This is
because we cannot use strstr as meson strings may contain NUL.
Unfortunately memmem is not posix so vendoring was necessary to maintain
strict posix compliance.
2023-04-10 07:16:59 -04:00
Stone Tickle
ecf01ff2a5
add copyright 2023-04-07 06:49:00 -04:00
Stone Tickle
6c0547b470
automatically unprefix build dir options
The invocation:

meson setup -Dlibdir=/usr/lib64 -Dprefix=/usr build

sets libdir to `lib64` because meson detects that it is an absolute path
that is a subdir of prefix.  This commit adds the same functionality to
muon.
2023-04-07 06:44:36 -04:00
Stone Tickle
c6207ca117
clean up includes 2023-03-28 06:49:19 -04:00
Vincent Torri
c7b33f7053
Add colors in logs on Windows
Support for Windows >= 7, for cmd and msys2. cygwin is already using
colors similar to linux
2023-03-28 06:41:58 -04:00
Stone Tickle
729b920adb
add scaffolding for print_colorized 2023-03-20 11:05:42 -04:00
Stone Tickle
b60b51965f
attempt to chdir to project root when -O is passed 2023-03-15 13:37:09 -04:00
Stone Tickle
40171e7e94
add quiet mode for parser 2023-03-15 13:36:42 -04:00
Stone Tickle
3f765c6a53
add -i flag to analyze muon internal eval files 2023-03-15 13:30:54 -04:00
Stone Tickle
d286201f39
rename posix.h to compat.h
Currently all compat.h does is define the appropriate POSIX macro unless
you are on windows, as well as conditionally enabling
__attribute__(format...).
2023-03-10 09:35:04 -05:00
Vincent Torri
6e2fdc5cbb
Windows: surround arguments with double quote 2023-02-28 10:13:06 -05:00
Stone Tickle
22c1d334af
analyzer: replace -u with -Werror 2023-02-27 10:44:54 -05:00
Stone Tickle
73a26346c8
make dead code warning non-fatal 2023-02-27 10:36:09 -05:00
Stone Tickle
ba48defcd9
make the analyzer smarter 2023-02-26 22:27:14 -05:00