1. Jonas
  2. FireLang2


Clone wiki

FireLang2 / Todo



  • Optional tokens
  • Dynamic tokenizer—Zetro style
    • Also make getValue a parameter to grouper.
      • Missing a getValue call for betweenString?
  • Remake operator parameter objects
    • {name: "a", type: "value", optional: true}
  • Typed arguments (?)


  • Rename "lazy" to "tree" (NPT).
  • Remake object system
    • type: "function", "function-builtin", "number", "string", "object"
    • value: code, function, number, string, (properties?)
    • properties: {} (object containing property refs)
    • call: implemented by function & function-builtin; function to be called when it's executed.
  • Let assignment handle evaluated LHS (e.g. foo['bar'] = 42)
    • Secondary operator (as opposed to modifying the existing one)?
  • Implement operator defining

Scoping ideas

  • When function is executed, gets its own scope.
    • Scope is an object, FL1 style?
  • Instantiation
    • JavaScript-style—function call with special "this" object, which is implicitly returned by the "new" operator?
      • Let "prototype" be overwritten with function or a constant value? (a bit like Lua)
    • Lua-style—simply return a new object literal, and let some metatable handle lookups


  • "var" operator: {"var" $x} initializes x and returns it as a name (how?)
  • "lazy" operator: {"lazy" $x} works as above but lazifies it. (e.g. stores parse tree instead of value, and evaluates on accessing.)
    • Laziness should support Haskell-style infinite series (instead of yield et al.)?
    • "lazy var foo = 42*n;" would be valid syntax (is it a good thing?)
  • {"{" #u "}" = f} -- syntax for operator defining?