Skip to content

The parser should generically look at Tornado "code blocks" #73

@jimmyhchan

Description

@jimmyhchan

Today the peg grammar handles distinguishing between a exists section etc.

e.g.

  var tornadoBodyTypes = {
    '?': 'exists',
    '^': 'notExists',
    '#': 'section',
    '@': 'helper',
    '+': 'block',
    '<': 'inlinePartial',
    '%': 'pragma'
  };

Now that we have an AST transform pass, we should be able to push this logic out into a separate pass and keep the grammar generic.

proposal:

  • a codeBlock is { followed by a codeBlockIdentifier ...
  • a codeBlockIdentifier is one of backtick~!@#%^&*_+-=;,.? -- what's on a US QWERTY keyboard minus dollar, parens, braces, brackets, pipe, colon, double and single quotes, <, > and slash and back slash since these are going to be confusing or are used for other things already

issues:

  • we might need to revisit what bodies are

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions