Skip to content

Commit

Permalink
use ; at the end of statements
Browse files Browse the repository at this point in the history
  • Loading branch information
Evgeny Metelkin committed Nov 30, 2023
1 parent a044ead commit 2325737
Show file tree
Hide file tree
Showing 21 changed files with 50 additions and 48 deletions.
2 changes: 2 additions & 0 deletions TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@
- support null for properties: highlight, parse, heta standard
- stoichiometry as `@Const` and `@Record`
- updating properties with `one::s1.assignments.start_ 5.5;`
- highlight for Vim https://ezpzdev.medium.com/create-a-vim-plugin-for-your-next-programming-language-structure-and-syntax-highlight-1dc0823a6b92
- highlight for notepad++ https://npp-user-manual.org/docs/user-defined-language-system/ https://ivan-radic.github.io/udl-documentation/numbers/

## remove lodash

Expand Down
10 changes: 5 additions & 5 deletions bin/init/index0.heta
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
template file for creating platform
*/
// add qsp units
include ./qsp-units.heta
include ./qsp-units.heta;

// include module.heta type heta
// include table.xlsx type table with { sheet: 0, omitRows: 3 }
// include addon.json type json
// include addon.yml type yaml
// include module.heta type heta;
// include table.xlsx type table with { sheet: 0, omitRows: 3 };
// include addon.json type json;
// include addon.yml type yaml;

p1 @Record .= 1;

Expand Down
16 changes: 8 additions & 8 deletions bin/init/index1.heta
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@
template file for creating platform
*/
// add qsp units
include ./qsp-units.heta
include ./qsp-units.heta;

// @Const
include ./table.xlsx type table with { sheet: 0, omitRows: 3 }
include ./table.xlsx type table with { sheet: 0, omitRows: 3 };
// @Record
include ./table.xlsx type table with { sheet: 1, omitRows: 3 }
include ./table.xlsx type table with { sheet: 1, omitRows: 3 };
// @Compartment
include ./table.xlsx type table with { sheet: 2, omitRows: 3 }
include ./table.xlsx type table with { sheet: 2, omitRows: 3 };
// @Species
include ./table.xlsx type table with { sheet: 3, omitRows: 3 }
include ./table.xlsx type table with { sheet: 3, omitRows: 3 };
// @Reaction
include ./table.xlsx type table with { sheet: 4, omitRows: 3 }
include ./table.xlsx type table with { sheet: 4, omitRows: 3 };

// include addon.json type json
// include addon.yml type yaml
// include addon.json type json;
// include addon.yml type yaml;

p1 @Record .= 1;

Expand Down
2 changes: 1 addition & 1 deletion cases/0-hello-world/src/index.heta
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
include ./qsp-units.heta type heta
include ./qsp-units.heta type heta;

// this block unites elements with the same space
namespace mm begin
Expand Down
4 changes: 2 additions & 2 deletions cases/1-one-compartment/src/dividing.heta
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ block @Const begin
Km = 1.1;
end

include non-saturable.heta
include saturable.heta
include non-saturable.heta;
include saturable.heta;

//#export {space: one_comp, format: SBML, filepath: sbml_non_saturable};
//#export {space: one_comp_saturation, format: SBML, filepath: sbml_saturable};
Expand Down
4 changes: 2 additions & 2 deletions cases/1-one-compartment/src/modify-model.heta
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ block @Const begin
Km = 1.1;
end

include non-saturable.heta
include non-saturable.heta;

namespace one_comp_saturation begin
include non-saturable.heta
include non-saturable.heta;
vel := Vmax*s1*comp1/(Km + s1);
end

Expand Down
2 changes: 1 addition & 1 deletion cases/12-to-sbml/src/index.heta
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
template file for creating platform
*/

include first-model.json type json
include first-model.json type json;

// exports
#export {
Expand Down
10 changes: 5 additions & 5 deletions cases/13-to-matlab/src/index.heta
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
template file for creating platform
*/
// add qsp units
include ./qsp-units.heta
include ./qsp-units.heta;

include model.heta
// include table.xlsx type xlsx with { sheet: 0, omitRows: 3 }
// include addon.json type json
// include addon.yml type yaml
include model.heta;
// include table.xlsx type xlsx with { sheet: 0, omitRows: 3 };
// include addon.json type json;
// include addon.yml type yaml;

// exports
#export { filepath: sbml, version: L2V4, format: SBML };
Expand Down
4 changes: 2 additions & 2 deletions cases/14-sbml-module/src/index.heta
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
#defineUnit volume {units: litre};
#defineUnit substance {units: mole};

include 00025-sbml-l2v4.xml type sbml
include 00025-sbml-l2v4.xml type sbml;
*/

#defineUnit _h {units: 1/hour};
include 00026-sbml-l2v4.xml type sbml
include 00026-sbml-l2v4.xml type sbml;

json_export #export { filepath: output, format: JSON };
2 changes: 1 addition & 1 deletion cases/17-multispace/src/index.heta
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
template file for creating platform
*/
// add qsp units
include ./qsp-units.heta
include ./qsp-units.heta;

comp1 @Compartment .= 1 { units: L, output: true };
s1 @Species { compartment: comp1, units: uM, output: true } .= 10;
Expand Down
4 changes: 2 additions & 2 deletions cases/2-cells/src/index.heta
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ end
namespace invitro begin
AXP_neu #import {fromId: AXP_neu, fromSpace: nameless};

include neu.heta
include neu.heta;
tot_vol @Compartment []= 0.1; // <L>

P1_mean @Record := ( P1_ext * ext + P1_neu * neu_vol ) / tot_vol;
Expand All @@ -26,7 +26,7 @@ namespace invivo begin
plasma #import {fromId: plasma, fromSpace: nameless};
k_prol #import {fromId: k_prol, fromSpace: nameless};

include neu.heta
include neu.heta;

blood @Compartment .= 5.2;
neu_count @Species {compartment: blood};
Expand Down
2 changes: 1 addition & 1 deletion cases/20-syntax/src/index.heta
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
template file for creating platform
*/
// add qsp units
include ./qsp-units.heta
include ./qsp-units.heta;

ud1_xxx #defineUnit {units: mole/L};
rec1 @Record {units: ud1_xxx} .= 12;
Expand Down
2 changes: 1 addition & 1 deletion cases/22-csv-module/src/index.heta
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
template file for creating platform
*/

include ./table.csv type table
include ./table.csv type table;

// exports
#export { format: JSON, filepath: output };
Expand Down
8 changes: 4 additions & 4 deletions cases/3-mixed-modules/src/index.heta
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@

#setNS {space: one, type: abstract};

include json.json type json
include json.json type json;

include heta.heta type heta
include heta.heta type heta;

include yaml.yml type yaml
include yaml.yml type yaml;

include xlsx.xlsx type xlsx with {
options: { sheetNum: [0, 1], omitRows: 3 }
}
};

include page.md type md with {
options: {pageId: xxx},
Expand Down
8 changes: 4 additions & 4 deletions cases/8-tables/src/index.heta
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@

// include module.heta type: heta
include table.xlsx type xlsx with { sheet: 0, omitRows: 3 }
// include module.heta type: heta;
include table.xlsx type xlsx with { sheet: 0, omitRows: 3 };

include table.xlsx type xlsx with { sheet: 1, omitRows: 3 }
include table.xlsx type xlsx with { sheet: 1, omitRows: 3 };

include table.xlsx type xlsx
include table.xlsx type xlsx;

#export {filepath: output, format: JSON};
2 changes: 1 addition & 1 deletion test/module-system-errors/cycle-a.heta
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// dependences: a <- b, b <- a, b <- c

include ./cycle-b.heta type heta
include ./cycle-b.heta type heta;

x := 1;
4 changes: 2 additions & 2 deletions test/module-system-errors/cycle-b.heta
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

include ./cycle-a.heta
include ./cycle-a.heta;

include ./cycle-c.heta
include ./cycle-c.heta;

y := x;
2 changes: 1 addition & 1 deletion test/module-system-errors/self-include.heta
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
k0 := 1.1;

include ./self-include.heta
include ./self-include.heta;
4 changes: 2 additions & 2 deletions test/module-system/normal-a.heta
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ one::k1 @Record {
title: hello world
};

include normal-b.heta
include normal-b.heta;

include ../module-system/normal-c.heta
include ../module-system/normal-c.heta;
4 changes: 2 additions & 2 deletions test/module-system/normal-b.heta
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
k2 @Const;
k2 = 1.2;

include ./normal-c.heta
include ./normal-c.heta;

include ./normal-d.json type json
include ./normal-d.json type json;
2 changes: 1 addition & 1 deletion test/module-system/normal-c.heta
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
k3 @Const;
k3 = 1.2;

include ./normal-e.yml type yaml
include ./normal-e.yml type yaml;

0 comments on commit 2325737

Please sign in to comment.