Skip to content

DirectiveParser

reference
1 min readUpdated

Kind: Class

Source: atloria-monorepo/packages/core/src/rendering/directive-parser.ts

Directive Parser

Methods

MethodSignatureReturns
parseparse(content: string)DocumentAST

Where it refuses work

  • DirectiveParser stops the work with an early return when expr.startsWith('!').
  • DirectiveParser stops the work with an early return when expr.startsWith('(') && expr.endsWith(')').

When something fails

  • DirectiveParser handles failure in 1 place: it turns it into a return value in all 1.

Was this page helpful?

Download as PDF