interface DslInterface (View source)

Contract for a Fusion DSL parser

A dsl can be registered like:

Neos:
  Fusion:
    dsl:
      afx: Neos\Fusion\Afx\Dsl\AfxDslImplementation

And will be available via its identifier in Fusion:

root = afx`
    <div>Hello World</div>
`

The returned string must be a valid fusion string, which is parsed again:

Neos.Fusion:Tag {
    tagName = 'div'
    content = 'Hello World'
}

Methods

string
transpile(string $code)

Transpile the given dsl-code to fusion-code

Details

string transpile(string $code)

Transpile the given dsl-code to fusion-code

Parameters

string $code

Return Value

string

Exceptions

Exception