lazd / DOMly

The fast template system that creates and clones DOM nodes
MIT License
53 stars 9 forks source link

Use a Jison-generated parser to handle dot notation and method invocation #1

Closed lazd closed 10 years ago

lazd commented 10 years ago

A Jison-generated parser should be employed to handle dot notation and method invocation.

The parser should handle strings of the following forms:

  1. someProp
  2. someMethod()
  3. this.someProp
  4. this.someMethod()
  5. this.someMethod(arg1,arg2)
  6. this.someMethod(this.arg1,this.arg2)

The goal is to support the following use cases:

Arbitrary conditionals in <if> tags:

<if this.someMethod(parent.someProp,this.someProp)>
  <p>Some HTML</p>
</if>