18 Commits (9befc31bb3bcc7cd95ab2361050216c3b651049d)

Autor SHA1 Nachricht Datum
  MaximeBarniaudy 9befc31bb3 Add an intern primitive for symbol creation vor 1 Jahr
  MaximeBarniaudy f3a2b47be9 Fix range access overshadowing key access vor 1 Jahr
  WitherFlower 5d11b521e5 Merge range access and grammar parser changes vor 1 Jahr
  Ian Piumarta 4ac12f91c5 Add symbols #O, #d, #v and Symbol.setop() primitive. Add primitive method Symbol.setopt(N) to set command-line option at runtime. Add primitive method Symbol.defined() to test if a variable name has been defined. Overload primitive "+" to concatenate strings. Add stack of namespaces, initialised to empty object. refvar() and getvar() search namespaces, from most to least recent, when looking for global variables. setvar() always defines globals in the most recent namespace regardless of any existing shadowed definitions. Make OBJ::NAME a synonym for OBJ.NAME except that OBJ::NAME() applies a function whereas OBJ.NAME() invokes method NAME on OBJ. Add primitive error() to print source location, error message, and backtrace. vor 1 Jahr
  Ian Piumarta 31e6d2ff3d Primitives have correct names. Primitive Object.keys() returns properties that do not begin with "__". Add method Object.allKeys() that returns properties that do not begin with "__". Add method Object.sorted() to sort indexable elements. Add function sorted() for String and Object. Relations do not consider strings and symbols to be comparable. Printing strings does not include quotation marks at indentation levels 0 and 1. Printing strings escapes control characters at indentation levels other than 0 and 1. Rename SetVar.expr to SetVar.value to be consistent with SetProp and SetArray. Add RefVar, RefProp, RefArray that compute address of assignable value. Add Binops for autoincrement and assignment operators. Any expression can be the subject of increment or assignment operator. Enforce lvalue for increment and assignment operators by semanic check, not in syntax. String literals can contain escaped quotation marks. Keyword:value pairs in parameter lists provide arbitray expressions as default parameter values. Evaluate and assign default parameters values in apply(). vor 1 Jahr
  Ian Piumarta 9cc8c3e572 Top-level expressions use the value of symbol __globals__ as the base environment instead of nil. Fix off-by-1 error in nlrPush(). Object.keys() returns keys in alphabetical order. vor 1 Jahr
  Ian Piumarta 057733b85f Binary operators store pointer to implementation to avoid operator selection during eval. vor 1 Jahr
  Ian Piumarta 2f164a3100 Use spaces instead of tabs to preserve visual alignment in broken tools. vor 1 Jahr
  Ian Piumarta 30facb810c Add auto increment/decrement and assignment operators. vor 1 Jahr
  Ian Piumarta 4d570df59e ForToFrom performs update step after continue. vor 1 Jahr
  Ian Piumarta 5ca296eb47 Add return, break, and continue. vor 1 Jahr
  Ian Piumarta 57fe021082 All symbols created with UNDEFINED_TYPECODE by default. AST nodes with undefined typecode are evaluated by invoking the method __eval__ on the node. Typecode is looked up in the immediate delegate of a node only. Object.__eval__() is primitive and returns self. vor 1 Jahr
  Ian Piumarta 4a959a124f Accessing an undefined variable causes a fatal error. vor 1 Jahr
  Ian Piumarta ddff3e48e8 Add "let name = value, ... ;" to create local variables. vor 1 Jahr
  Ian Piumarta 3c992f4a13 Remove primitive makeForm (because Closure.fixed is now accessibe from userland). vor 1 Jahr
  Ian Piumarta 72753c6725 All fields of Lambda and Closure are accessible via Object_{get,put}. vor 1 Jahr
  Ian Piumarta bc3aae1dcb Block_eval() executes its body in a new environment vor 1 Jahr
  Ian Piumarta ec29069aa4 import files vor 1 Jahr