Commit Graph

13 Commits

Author SHA1 Message Date
Dummi26
2293e9365c added boolean functions not(a), and(a v) and or(a b). and and or are short-circuiting. 2023-04-19 14:32:30 +02:00
Dummi26
ea5346f81c fixed a bug where the character directly following a float literal would be ignored (because parsing the float accidentally used that character). this is what caused [12.5] to break. 2023-04-15 16:01:34 +02:00
Dummi26
c484d2cbb2 fixed parser infinite looping because parse_function() on a function with no args (fn my_func() {}) would break before the ')'. 2023-04-15 15:41:07 +02:00
Dummi26
65fdc87c01 added more accurate type-checking to some of the builtins 2023-04-15 14:41:52 +02:00
Dummi26
effdc096a2 implemented working float literals and removed the 5,2 workaround: 5.2 is now a float! (see 10.5.debug()).
this was an issue for so long because it requires an exception to the usual dot syntax, and exceptions can be dangerous. So if there is an issue, you can resort to { 10.5 }.something() or { 10 }.5 (although this doesn't make sense) to convince the parser to do what you want.
2023-04-15 14:22:41 +02:00
Dummi26
b2a36416cf implemented better errors (not finished). this also prevents crashes (because there were todo!()s and panic!()s as temporary errors before) when an error is found while in interactive mode. 2023-04-14 20:47:13 +02:00
Dummi26
dfd83fa581 fixed warnings in mers, but one warning in parse.rs will stay 2023-04-14 17:10:54 +02:00
Dummi26
7a7da1e946 add \n to files that dont end in one to prevent weird errors 2023-04-13 17:51:38 +02:00
Dummi26
a2a976c7f9 - changed the list type from [t] to [t ...]
- added more examples to the readme
2023-04-13 17:40:25 +02:00
Dummi26
233590ead3 added -e: mers -e println("you don't need a file for this") 2023-04-13 04:21:15 +02:00
Dummi26
765a2597ee added thread example and made small changes to the readme 2023-04-13 04:04:48 +02:00
Dummi26
ce61749260 - Added assume_no_enum() because the Err enum is used at least as often as [] for reporting fails.
- changed substring(a b) behavior from "b is the max length of the resulting string" to "b is the exclusive end index, unless it is negative, in which case its abs() value is the maximum length".
- fixed a bug in libs/path
- added the http_requests library, which can be used to make very basic GET requests
- fixed a bug in the gui library that would mess up button handling
- you can now escape comments using a backslash `\`: \// will turn into the literal //, \/* will turn into the literal /*. Useful for URLs (because comments work in string literals). Putting a backslash before a linebreak will also ignore that linebreak (useful in long string literals)
2023-04-13 03:04:47 +02:00
Dummi26
2acdcd3f53 moved Cargo.toml and src/ to /mers/Cargo.toml and /mers/src/ because rust-analyzer was apparently very confused when I was trying to edit projects in mers_libs/*/. 2023-04-12 22:23:07 +02:00