Commit Graph

312 Commits

Author SHA1 Message Date
sage 49fbc490a7 Add fallback message. 2023-10-31 23:07:58 -04:00
sage e2fdf6dbbe Add a live REPL 2023-10-31 23:04:07 -04:00
Sage Vaillancourt 8b9a351be1 Use throw() instead of returning errorObject() results directly
Add (type-of) for getting the string representation of an object's type.
2023-03-03 14:58:54 -05:00
Sage Vaillancourt c37a12e244 Rename main() files.
Tweak checkTypes() to expect a closing semicolon.
2023-03-03 10:57:04 -05:00
Sage Vaillancourt 6176e9eb4b Improve lambda param handling.
Add (rand)
Clean up testing output.
tic-tac-toe.pbl QOL changes
2022-10-25 14:39:20 -04:00
Sage Vaillancourt 9b6b80f204 Add missing BAD_SYMBOL error 2022-10-25 14:39:16 -04:00
Sage Vaillancourt a145b436c9 Merge remote-tracking branch 'origin/master' 2022-10-25 14:39:02 -04:00
Sage Vaillancourt 672cdb692a Display parseEval source in error messages. 2022-10-25 13:21:04 -04:00
Sage Vaillancourt 6503bd7dcc Extend README to cover some non-Pebble functions.
Replace native function's pointer representation with "NATIVE_FUNC"
2022-10-11 22:27:25 -04:00
Sage Vaillancourt aae322e7fc Add basic table of contents to README 2022-10-12 01:04:14 +00:00
Sage Vaillancourt cba73e45b7 Add explicit fallback prompt. 2022-10-11 20:44:03 -04:00
Sage Vaillancourt e05b5648ae Correct README typo. 2022-10-12 00:14:08 +00:00
Sage Vaillancourt ca16fa60ab Use codeblocks in README.
Also more consistent "For example" punctuation
2022-10-12 00:12:51 +00:00
Sage Vaillancourt 43556ebf08 Include link to Rebble in README. 2022-10-10 03:30:10 +00:00
Sage Vaillancourt b03d4cbd3f Fix mapO behavior to match typical lambdas.
Fix isCd REPL check.
Add tic-tac-toe.pbl
2022-05-02 16:55:27 -04:00
Sage Vaillancourt 139e912548 Add a simple assert() macro.
assert() is disabled when calling make release
Support negative numbers!
2022-04-27 16:44:07 -04:00
Sage Vaillancourt 5ab7a638af Square up escaping.
Inline the one objFromSlice() usage.
Add dedicated escapedStringFromSlice().
Switch forbble to use backslash comments.
2022-04-26 16:23:55 -04:00
Sage Vaillancourt b39db34208 Rename plfunc/plfunc to plfunc/general.
Fix new docTexts cleanup.
2022-04-25 16:30:57 -04:00
Sage Vaillancourt 08bf35940d Add a simple (doc-test) function.
Switch from single docString to docStrings array.
Fix (split) substringing.
2022-04-25 14:40:29 -04:00
Sage Vaillancourt bac1790b6c Allow for multiple strings of lambda documentation.
Still trying to see a good way to base testing off of this.
2022-04-25 14:39:44 -04:00
Sage Vaillancourt ce3472cb90 Add simple varargs. 2022-04-25 13:39:03 -04:00
Sage Vaillancourt 61a402604b Require Object declaration with BuildListNamed(). 2022-04-22 16:07:47 -04:00
Sage Vaillancourt cb8d966a05 Add Forbble comments.
End Forbble definitions with : not $
(feval) one big string, instead of doing a for-each.
2022-04-22 14:56:16 -04:00
Sage Vaillancourt 1094a85227 Add list-defs back.
Use them in Forbble.
2022-04-22 13:09:15 -04:00
Sage Vaillancourt 8b10cb6a46 Don't always run forbble tests. 2022-04-22 10:41:32 -04:00
Sage Vaillancourt 6dcec5a8c5 Fix forbble op order.
Add some demo functions and testing to forbble. Delete forbble_old.pbl
Check for "q" quit *after* REPL preprocessing.
Close file in readFileToObject().
2022-04-22 10:40:38 -04:00
Sage Vaillancourt d40e551933 Add dedicated plfunc directory.
Contains most native pl functions.
Consolidated pebcom into pebbleobject.
Broke out several pc (STANDALONE) and plstring functions into their own files.
2022-04-22 08:57:02 -04:00
Sage Vaillancourt 20f2d02f77 A bit of cleanup/simplification. 2022-04-22 07:37:25 -04:00
Sage Vaillancourt 1c52cb0ff1 Simplify some functions.
Remove some unused stuff.
Add macros for Lambda docString and reference access.
2022-04-21 12:01:02 -04:00
Sage Vaillancourt af65349d27 Simplify copyList and inline some of prepend(). 2022-04-21 11:43:07 -04:00
Sage Vaillancourt 9d2effe206 Better stringing. 2022-04-20 17:01:02 -04:00
Sage Vaillancourt d825ca3fe2 Add fib to forbble.
Add git branch to pl prompt.
Fix readFileToString() for empty files.
2022-04-19 20:43:53 -04:00
Sage Vaillancourt a47e280c76 Forbble tests are back on the menu. 2022-04-19 17:00:40 -04:00
Sage Vaillancourt bd6b26331b A crumb of cleanup. 2022-04-19 16:53:39 -04:00
Sage Vaillancourt 11525e9531 More (table) use in Forbble2.
Clean objects when adding duplicates to a hash table.
Type-check hash functions.
Add (switch) (first-where) and (match) to lib.pbl.
Support escaping in (standalone) strings.
2022-04-19 15:18:29 -04:00
Sage Vaillancourt b26771d33c Fleshing out ObjectTableObject.
Also fleshing out forbble2.
Fix _readFile() memory leak.
2022-04-18 22:17:17 -04:00
Sage Vaillancourt 8e30b24e8f Start work on hash-table objects. 2022-04-18 16:59:35 -04:00
Sage Vaillancourt 4ea3b1d36d Start work on forbble2.
Keep the old version around for now.
Add (indexOf) and (split) to lib.pbl
Distinct addToEnv() and setInEnv().
Add .clangd to gitignore.
2022-04-18 15:37:34 -04:00
Sage Vaillancourt 04b7e7b64a Centralize/simplify file-reading.
Handle comments at the token level.
2022-04-18 11:18:43 -04:00
Sage Vaillancourt f458b52a17 Add refcount to StaticFunction.
Small appendf() macro for object-stringing.
2022-04-18 09:59:57 -04:00
Sage Vaillancourt b0e89cafd4 Toying with a more optimized function representation.
Starting with just struct accesses.
2022-04-14 16:05:46 -04:00
Sage Vaillancourt 83b1b9212e Fix no-context error-handling.
Centralize parts of number-parsing.
2022-04-14 16:04:25 -04:00
Sage Vaillancourt 3f4d8fd7af Start dropping support for semicolon separators.
Simplify some error functions.
Oh, right. strdup() exists.
2022-04-14 00:31:51 -04:00
Sage Vaillancourt e326af38f8 Allow number indexing of struct fields.
Better error messages on failed struct access.
2022-04-13 16:57:58 -04:00
Sage Vaillancourt 80255af52e Split up some of the native testing code.
Makes running specific tests a little cleaner.
2022-04-13 16:48:37 -04:00
Sage Vaillancourt 54410030f7 Add throw() macro.
Simplifies the creation of complex error messages.
2022-04-13 15:17:59 -04:00
Sage Vaillancourt 9415b27f41 Add struct-handling to (?)
Move several functions from pebblisp.pbl to lib.pbl.
pebblisp.pbl aliases replace the start of a command, rather than exact match.
2022-04-13 15:17:46 -04:00
Sage Vaillancourt d9d2bca8c8 Some optimization attempts in progress.
Toying with a more efficient native-function-use implementation.
Replace getErrorCode with a macro.
Store initial slice array on the stack, mallocing at the end.
2022-04-12 22:42:41 -04:00
Sage Vaillancourt 0fd58832bf Fix some promise memory handling.
Adjust disabled-test printing in `?`.
Disable part of async testing (with comment explanation).
2022-04-11 21:42:00 -04:00
Sage Vaillancourt 96d759a7e6 Merge branch 'master' of https://gitlab.com/sagev9000/pebblisp 2022-04-11 20:44:38 -04:00