diff --git a/TODO.md b/TODO.md index 1532c6b5..888be660 100644 --- a/TODO.md +++ b/TODO.md @@ -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 diff --git a/bin/init/index0.heta b/bin/init/index0.heta index 9ad69cac..7625a3fb 100644 --- a/bin/init/index0.heta +++ b/bin/init/index0.heta @@ -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; diff --git a/bin/init/index1.heta b/bin/init/index1.heta index 058698bb..48ced88b 100644 --- a/bin/init/index1.heta +++ b/bin/init/index1.heta @@ -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; diff --git a/cases/0-hello-world/src/index.heta b/cases/0-hello-world/src/index.heta index 3ec38f13..a5de3841 100644 --- a/cases/0-hello-world/src/index.heta +++ b/cases/0-hello-world/src/index.heta @@ -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 diff --git a/cases/1-one-compartment/src/dividing.heta b/cases/1-one-compartment/src/dividing.heta index 455f58d8..c0ff1560 100644 --- a/cases/1-one-compartment/src/dividing.heta +++ b/cases/1-one-compartment/src/dividing.heta @@ -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}; diff --git a/cases/1-one-compartment/src/modify-model.heta b/cases/1-one-compartment/src/modify-model.heta index aff0b5b1..4d82aa06 100644 --- a/cases/1-one-compartment/src/modify-model.heta +++ b/cases/1-one-compartment/src/modify-model.heta @@ -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 diff --git a/cases/12-to-sbml/src/index.heta b/cases/12-to-sbml/src/index.heta index a3a6f2db..1826ef43 100644 --- a/cases/12-to-sbml/src/index.heta +++ b/cases/12-to-sbml/src/index.heta @@ -2,7 +2,7 @@ template file for creating platform */ -include first-model.json type json +include first-model.json type json; // exports #export { diff --git a/cases/13-to-matlab/src/index.heta b/cases/13-to-matlab/src/index.heta index 04b45158..0458472a 100644 --- a/cases/13-to-matlab/src/index.heta +++ b/cases/13-to-matlab/src/index.heta @@ -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 }; diff --git a/cases/14-sbml-module/src/index.heta b/cases/14-sbml-module/src/index.heta index c7c12722..a35fc13d 100644 --- a/cases/14-sbml-module/src/index.heta +++ b/cases/14-sbml-module/src/index.heta @@ -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 }; diff --git a/cases/17-multispace/src/index.heta b/cases/17-multispace/src/index.heta index 48919fda..20161454 100644 --- a/cases/17-multispace/src/index.heta +++ b/cases/17-multispace/src/index.heta @@ -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; diff --git a/cases/2-cells/src/index.heta b/cases/2-cells/src/index.heta index 31e8774c..e6a5b3ee 100644 --- a/cases/2-cells/src/index.heta +++ b/cases/2-cells/src/index.heta @@ -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; // P1_mean @Record := ( P1_ext * ext + P1_neu * neu_vol ) / tot_vol; @@ -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}; diff --git a/cases/20-syntax/src/index.heta b/cases/20-syntax/src/index.heta index fc2cb172..68a8cb27 100644 --- a/cases/20-syntax/src/index.heta +++ b/cases/20-syntax/src/index.heta @@ -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; diff --git a/cases/22-csv-module/src/index.heta b/cases/22-csv-module/src/index.heta index 35920f55..e85313f7 100644 --- a/cases/22-csv-module/src/index.heta +++ b/cases/22-csv-module/src/index.heta @@ -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 }; diff --git a/cases/3-mixed-modules/src/index.heta b/cases/3-mixed-modules/src/index.heta index b50c58f2..64cf71d8 100644 --- a/cases/3-mixed-modules/src/index.heta +++ b/cases/3-mixed-modules/src/index.heta @@ -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}, diff --git a/cases/8-tables/src/index.heta b/cases/8-tables/src/index.heta index 7eaa8ce4..cea56a5e 100644 --- a/cases/8-tables/src/index.heta +++ b/cases/8-tables/src/index.heta @@ -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}; diff --git a/test/module-system-errors/cycle-a.heta b/test/module-system-errors/cycle-a.heta index ba3a6962..deea6425 100644 --- a/test/module-system-errors/cycle-a.heta +++ b/test/module-system-errors/cycle-a.heta @@ -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; diff --git a/test/module-system-errors/cycle-b.heta b/test/module-system-errors/cycle-b.heta index dcd47e37..1c4c20f0 100644 --- a/test/module-system-errors/cycle-b.heta +++ b/test/module-system-errors/cycle-b.heta @@ -1,6 +1,6 @@ -include ./cycle-a.heta +include ./cycle-a.heta; -include ./cycle-c.heta +include ./cycle-c.heta; y := x; diff --git a/test/module-system-errors/self-include.heta b/test/module-system-errors/self-include.heta index 8b13986a..01cdd1e2 100644 --- a/test/module-system-errors/self-include.heta +++ b/test/module-system-errors/self-include.heta @@ -1,3 +1,3 @@ k0 := 1.1; -include ./self-include.heta +include ./self-include.heta; diff --git a/test/module-system/normal-a.heta b/test/module-system/normal-a.heta index b7e45b52..fbcbac66 100644 --- a/test/module-system/normal-a.heta +++ b/test/module-system/normal-a.heta @@ -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; diff --git a/test/module-system/normal-b.heta b/test/module-system/normal-b.heta index 2a20322e..60477285 100644 --- a/test/module-system/normal-b.heta +++ b/test/module-system/normal-b.heta @@ -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; diff --git a/test/module-system/normal-c.heta b/test/module-system/normal-c.heta index a8348b21..5a4f1f09 100644 --- a/test/module-system/normal-c.heta +++ b/test/module-system/normal-c.heta @@ -1,4 +1,4 @@ k3 @Const; k3 = 1.2; -include ./normal-e.yml type yaml +include ./normal-e.yml type yaml;