_hyperscript icon indicating copy to clipboard operation
_hyperscript copied to clipboard

Documentation for internal hyperscript functions

Open benpate opened this issue 4 years ago • 0 comments

I think I just made my first operator for hyperscript (yay!). To flatten the learning curve, it would be very helpful to document the basic parameters required by the internal functions in hyperscript.

I don't know if it's best on the website, somewhere in a GitHub wiki, or as comments in the source code, but here are the functions/parameters that I'd love to understand better:

  • _runtime.unifiedEval(parseElement, op, ctx)
  • parser.parseElement(type, tokens, root)
  • parser.addGrammarElement(name, definition)
  • arguments to definition(parser, tokens) function passed in to addGrammarElement
  • structure returned by definition(parser, tokens)
  • when can I call expression.evaluate() and when must I call _runtime.unifiedEval()

benpate avatar Feb 20 '21 22:02 benpate