From a142e057162499db0df37e8abf5e515c6e297a04 Mon Sep 17 00:00:00 2001 From: bnewbold Date: Sun, 18 Dec 2016 13:18:36 -0800 Subject: parser: quantity field for component declaration --- modelica-parser-lalrpop/src/ast.rs | 1 + modelica-parser-lalrpop/src/parser.lalrpop | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'modelica-parser-lalrpop') 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, + pub quantity: Option, pub units: Option, pub description: Option, } 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 = { (",")? => - ComponentDeclaration { name:name, description:desc, value:value, units:units }, + ComponentDeclaration { name:name, description:desc, value:value, units:units, quantity:None }, }; component_prefix: ComponentPrefix = { -- cgit v1.2.3