derived/ast
Types
pub type FieldType {
NamedType(
name: String,
module: option.Option(String),
parameters: List(FieldType),
)
TupleType(elements: List(FieldType))
FunctionType(parameters: List(FieldType), return: FieldType)
VariableType(name: String)
}
Constructors
-
NamedType( name: String, module: option.Option(String), parameters: List(FieldType), ) -
TupleType(elements: List(FieldType)) -
-
VariableType(name: String)
pub type ParseError {
UnexpectedToken
IgnoredToken
}
Constructors
-
UnexpectedTokenEncountered an unexpected token while parsing a derived type
-
IgnoredTokenEncountered an unexpected token in a place where unknown tokens are expected (e.g. while parsing a function)
pub type Publicity {
Public
Private
}
Constructors
-
Public -
Private
pub type Target {
Erlang
Javascript
}
Constructors
-
Erlang -
Javascript
Values
pub fn parse(input: String) -> List(DerivedType)
Extract any custom types marked with !derived() from the input string including their docstrings.
All other syntaxes (including invalid syntaxes) are ignored