aboutsummaryrefslogtreecommitdiffstats
path: root/modelica-parser-lalrpop/src
diff options
context:
space:
mode:
Diffstat (limited to 'modelica-parser-lalrpop/src')
-rw-r--r--modelica-parser-lalrpop/src/ast.rs1
-rw-r--r--modelica-parser-lalrpop/src/parser.lalrpop2
2 files changed, 2 insertions, 1 deletions
diff --git a/modelica-parser-lalrpop/src/ast.rs b/modelica-parser-lalrpop/src/ast.rs
index 2c55782..3b31072 100644
--- a/modelica-parser-lalrpop/src/ast.rs
+++ b/modelica-parser-lalrpop/src/ast.rs
@@ -86,6 +86,7 @@ pub struct ComponentClause {
pub struct ComponentDeclaration {
pub name: String,
pub value: Option<Expr>,
+ pub quantity: Option<String>,
pub units: Option<String>,
pub description: Option<String>,
}
diff --git a/modelica-parser-lalrpop/src/parser.lalrpop b/modelica-parser-lalrpop/src/parser.lalrpop
index 2c64889..a2c5d44 100644
--- a/modelica-parser-lalrpop/src/parser.lalrpop
+++ b/modelica-parser-lalrpop/src/parser.lalrpop
@@ -54,7 +54,7 @@ component_clause: ComponentClause = {
component_declaration: ComponentDeclaration = {
<name:identifier> <units:units_declaration?> <value:value_declaration?> <desc:string_literal?> (",")? =>
- ComponentDeclaration { name:name, description:desc, value:value, units:units },
+ ComponentDeclaration { name:name, description:desc, value:value, units:units, quantity:None },
};
component_prefix: ComponentPrefix = {