Skip to content

Commit

Permalink
Improve LONGITUDINAL_DIFFUSION. (#1497)
Browse files Browse the repository at this point in the history
Clean up code comments, improve naming and fix a typo.
  • Loading branch information
1uc authored Oct 3, 2024
1 parent c5fb9fe commit a731cc1
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/language/code_generator.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ set(AST_GENERATED_SOURCES
${PROJECT_BINARY_DIR}/src/ast/linear_block.hpp
${PROJECT_BINARY_DIR}/src/ast/local_list_statement.hpp
${PROJECT_BINARY_DIR}/src/ast/local_var.hpp
${PROJECT_BINARY_DIR}/src/ast/lon_difuse.hpp
${PROJECT_BINARY_DIR}/src/ast/lon_diffuse.hpp
${PROJECT_BINARY_DIR}/src/ast/model.hpp
${PROJECT_BINARY_DIR}/src/ast/mutex_lock.hpp
${PROJECT_BINARY_DIR}/src/ast/mutex_unlock.hpp
Expand Down
14 changes: 7 additions & 7 deletions src/language/nmodl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1546,21 +1546,21 @@
separator: " "
brief: "Represent COMPARTMENT statement in NMODL"

- LonDifuse:
- LonDiffuse:
nmodl: LONGITUDINAL_DIFFUSION
members:
- name:
brief: "TODO"
- index_name:
brief: "Index variable name"
type: Name
optional: true
prefix: {value: " "}
suffix: {value: ","}
- expression:
brief: "TODO"
- rate:
brief: "Diffusion coefficient/rate"
type: Expression
prefix: {value: " "}
- names:
brief: "TODO"
- species:
brief: "Names of the diffusing species"
type: Name
vector: true
prefix: {value: " {"}
Expand Down
6 changes: 3 additions & 3 deletions src/parser/nmodl.yy
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@
%type <ast::Conserve*> conserve
%type <ast::Expression*> react
%type <ast::Compartment*> compartment
%type <ast::LonDifuse*> longitudinal_diffusion
%type <ast::LonDiffuse*> longitudinal_diffusion
%type <ast::NameVector> name_list
%type <ast::ExpressionVector> unit_block_body
%type <ast::UnitDef*> unit_definition
Expand Down Expand Up @@ -1723,11 +1723,11 @@ compartment : COMPARTMENT NAME_PTR "," expression "{" name_list "}"

longitudinal_diffusion : LONGDIFUS NAME_PTR "," expression "{" name_list "}"
{
$$ = new ast::LonDifuse($2, $4, $6);
$$ = new ast::LonDiffuse($2, $4, $6);
}
| LONGDIFUS expression "{" name_list "}"
{
$$ = new ast::LonDifuse(NULL, $2, $4);
$$ = new ast::LonDiffuse(NULL, $2, $4);
}
;

Expand Down

0 comments on commit a731cc1

Please sign in to comment.