Commit Graph

175 Commits

Author SHA1 Message Date
mark
22b4ace81b added \r and \0 escape sequences 2023-05-23 20:24:32 +02:00
mark
07a443a60b <, <=, > and >= are ordered to happen before == and != instead of defaulting to left-to-right 2023-05-23 19:12:26 +02:00
mark
14d1995d8b add order of operations to the parser ( . | + - | * / % | == != < <= > >= | = ) 2023-05-23 12:20:36 +02:00
mark
7af9902b6a fixed [[2]].0.0 parsing 0.0 as a float, removed get_ref() and made get() return a reference to the inner value if called on a reference to a collection (&[int ...].get(0) returns []/[&int]). 2023-05-23 12:01:27 +02:00
mark
56b457e1b3 add missing file 2023-05-19 21:28:57 +02:00
mark
b5924b5da1 -f+c will print the parsed script with colored highlighting 2023-05-19 21:25:05 +02:00
mark
79797e6718 size/welcome.mers no longer has the executable bit set. 2023-05-18 02:34:01 +02:00
mark
f2f5af94a7 . 2023-05-18 02:31:04 +02:00
mark
79a9d17ba9 updated example for github.io site 2023-05-18 02:12:21 +02:00
Mark
ac3221471f
Create intro.md
before we can add advanced examples, we need type inference: just because I declare a variable as `[]` doesn't mean I'll never write a value to it.
2023-05-18 02:06:45 +02:00
Mark
8bfe5acd06
Update README.md
simplify readme
2023-05-18 01:07:15 +02:00
mark
ac8d3befb7 temporarily made cloning actually clone, giving up on CopyOnWrite for now because I kept finding tiny bugs. This might harm performance, but overall performance was bad and will still be bad so who even cares, at least everything kindof works now. 2023-05-18 00:08:28 +02:00
mark
aff55fdc9e changed VData system again, renamed src/script to src/lang and added src/c.mers, which is an example something that currently does not work properly due to the VData implementation (and serves as a reminder to fix the issue) 2023-05-14 00:11:36 +02:00
mark
f8102c8fe6 (maybe?) fixed inner mutability on immutable (shared) values 2023-05-12 15:32:56 +02:00
mark
c501a6e558 fixed bug with function args and custom types 2023-05-12 15:03:20 +02:00
mark
f76ff55401 removed type_syntax.mers test because type force syntax will change (and has been removed for now).
i plan to move it to the statement itself rather than the assignment
2023-05-12 01:02:42 +02:00
mark
e53fc98f15 amogus.mers wont fail without fish anymore 2023-05-12 00:59:32 +02:00
mark
bba48b311f changed assignment parser from var = statement to statement = statement
left side of assignments can now be various different things instead of just variables. any statement that returns a reference can be used to assign to the value behind that reference. variables are automatically referenced, so the '&' can be omitted. if the variable contains a reference and that reference should be used, dereference it with *varname instead of just varname.
2023-05-12 00:44:47 +02:00
mark
6f31abd5cc changed VData implementation. It will now always (exception: references) behave like a clone BUT it will avoid cloning whenever possible using Copy-on-Write-style logic. 2023-05-11 14:49:49 +02:00
mark
79b169d951 fixed bug where all but the first loop iterations would write data to the mutable variables from the last iteration(s) even though the variables are supposed to be completely local: is_init can be set on steatements that have an output_to to force them to always redeclare and never reassign the new value. 2023-05-11 01:56:33 +02:00
mark
9ec4acaf70 made custom type names case-insensitive 2023-05-11 01:11:12 +02:00
mark
4efee9e2a2 completely changed the VData/VDataEnum system: Multiple VData can share one VDataEnum via an Arc<Mutex<VDataEnum>>. If one wants to modify the data, it copies it (Copy on Write). This copying is skipped for shared mutable data (references). This was necessary for the get_ref() function. Expect bugs! 2023-05-11 01:04:15 +02:00
mark
ceddb886a9 changed usize/isize static size types from u32/i32 to u64/i64 2023-05-10 20:02:36 +02:00
mark
924715cce1 changed while to loop in example .mers files 2023-05-09 22:18:39 +02:00
mark
a7bb3e67fa libraries can now work threaded if they wish (see http_requests). This means that multiple functions provided by one library can run at the same time (using thread(), see http.mers) and actually do the work they need to do simultaneously. 2023-05-09 22:11:13 +02:00
mark
9b92c5b353 . 2023-05-04 05:54:01 +02:00
mark
65dc9e577e . 2023-05-04 05:51:27 +02:00
mark
5e2b4a38b1 . 2023-05-04 05:46:23 +02:00
mark
df0a195a1f . 2023-05-04 05:45:28 +02:00
mark
5a8edd9605 update site 2023-05-04 05:42:45 +02:00
mark
f8e23d0ce8 Added index.html for the github page. Built from site/index.html using site/build.mers as a preprocessor. 2023-05-04 03:58:16 +02:00
mark
4c86897a71 fix nushell_plugins not compiling due to rename of parse module to parsing 2023-05-01 01:05:22 +02:00
mark
77cd1358e6 fixed bad error message if no arguments are provided 2023-04-30 22:41:36 +02:00
Mark
ea20d9960f
Update README.md 2023-04-30 22:34:11 +02:00
Mark
779605e7e6
Update rust.yml 2023-04-30 22:31:43 +02:00
mark
b83f54cb2d added basic tests 2023-04-30 22:21:46 +02:00
Mark
657f282006
Create rust.yml
i have no clue what i'm doing
2023-04-30 21:41:34 +02:00
mark
a36002b11d Merge branch 'main' of https://github.com/Dummi26/mers 2023-04-30 21:39:31 +02:00
mark
c370fc7e1e changed gitignore 2023-04-30 21:38:37 +02:00
Mark
d3f81af1d0
Delete nu_plugin_mers 2023-04-30 21:38:15 +02:00
Mark
644ff1bba8
Delete mers 2023-04-30 21:38:07 +02:00
mark
ca3dd4c798 forgot to add files to last commit. L. 2023-04-30 21:37:13 +02:00
Dummi26
0feb1b8778 added nushell support. 2023-04-30 17:31:50 +02:00
mark
1a446248e4 fixed 'type [custom type] does not fit in [litterally the same type but not custom]' problem 2023-04-29 19:56:54 +02:00
mark
ef5874747e added custom types that can be defined using 'type <name> <type>' 2023-04-29 19:04:38 +02:00
mark
8bafe58593 safety commit because i want to try cargo fix 2023-04-29 16:35:25 +02:00
Dummi26
690a4716fd add missing files 2023-04-29 01:48:06 +02:00
Dummi26
09d0d29138 added macro support, syntax is !(macro-type ...), i.e. !(mers my_file.mers) or !(mers { "value to compute at compile-time".regex("\\S+").assume_no_enum() }) 2023-04-29 01:45:00 +02:00
Dummi26
0a2c67c2d5 changed syntax from var::type to var: type 2023-04-26 22:53:22 +02:00
Dummi26
d9c354685f changed syntax from var::type = statement to var: type = statement 2023-04-26 22:52:31 +02:00