Module Syntax_fragments

module Syntax_fragments: sig .. end
Useful fragments of Modelica syntax

val empty_app : Syntax.exp -> Syntax.application
Return an empty application with the given expression as function
val named : string -> Syntax.exp -> Syntax.named_arg
Convenience constructor for Syntax.named_arg with no location information attached
val no_comment : Syntax.comment
The empty comment
val unannotated : 'a -> 'a Syntax.annotated
Combine any element with an empty annotation
val uncommented : 'a -> 'a Syntax.commented
Combine any element with the empty comment
val no_modification : Syntax.modification
The empty modification
val no_def_options : Syntax.definition_options
The options parsed from no definition flags
val empty_def : Syntax.definition_structure
A skeleton for definitions
val no_type_options : Syntax.typedef_options
The options parsed from no type-definition flags
val empty_typedef : unit Syntax.typedef_struct
A skeleton for type-definitions
val empty_behavior : Syntax.behavior
The empty cargo section of a class
val empty_elements : Syntax.elements
The empty element list
val empty_composition : Syntax.composition
The empty composition
exception EmptyName
Thrown when attempted to create a name or type-name from an empty list
val name : string list -> Syntax.exp
Create a name from the list of its elements
Raises EmptyName in case of the empty list
val type_name : string list -> Syntax.texp
Create a type-name from the list of its elements
Raises EmptyName in case of the empty list