AssemblyFormatDirective

scair.clair.macros.AssemblyFormatDirective
case class AssemblyFormatDirective(directives: Seq[Directive])

Declarative assembly format representation. Contains a sequence of directives that define the format.

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def buildOperation(opDef: OperationDef, p: Expr[Parser], parsed: Expr[Tuple])(using Quotes): Expr[Operation]

Use the operation definition to generate logic to build the operation from the parsed tuple.

Use the operation definition to generate logic to build the operation from the parsed tuple.

Attributes

def parse(opDef: OperationDef, p: Expr[Parser])(using ctx: Expr[ParsingRun[Any]])(using quotes: Quotes): Expr[ParsingRun[Operation]]

Generate a complete specialized parser for this assembly format and operation definition. This will parse the assembly format into a tuple of parsed values, which can then be used to build the operation using the operation definition.

Generate a complete specialized parser for this assembly format and operation definition. This will parse the assembly format into a tuple of parsed values, which can then be used to build the operation using the operation definition.

Value parameters

ctx

The P context for the generated parser.

opDef

The OperationDef for which to generate the parser.

p

The Parser argument of the generated parser.

Attributes

Returns

Specialized code to parse an assembly format into an Operation.

def parseTuple(p: Expr[Parser])(using ctx: Expr[ParsingRun[Any]])(using quotes: Quotes): Expr[ParsingRun[Tuple]]

Generates a parser for this assembly format. It currently simply chains all the individual directives parsers. This will parse each directives' output into a tuple, which can then be used to generate the operation.

Generates a parser for this assembly format. It currently simply chains all the individual directives parsers. This will parse each directives' output into a tuple, which can then be used to generate the operation.

Attributes

The list of directives that parse into something, as opposed to literal. Helps with indexing the parsed tuple.

The list of directives that parse into something, as opposed to literal. Helps with indexing the parsed tuple.

Attributes

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product