diff --git a/languages.json b/languages.json index efdd6de45..ff3287499 100644 --- a/languages.json +++ b/languages.json @@ -926,6 +926,12 @@ "quotes": [["\\\"", "\\\""]], "extensions": ["mlt"] }, + "Modelica": { + "line_comment": ["//"], + "multi_line_comments": [["/*", "*/"]], + "quotes": [["\\\"", "\\\""]], + "extensions": ["mo", "mos"] + }, "ModuleDef": { "name": "Module-Definition", "extensions": ["def"], diff --git a/tests/data/Modelica.mo b/tests/data/Modelica.mo new file mode 100644 index 000000000..d2c6303c9 --- /dev/null +++ b/tests/data/Modelica.mo @@ -0,0 +1,21 @@ +// 21 lines 13 code 5 comments 3 blanks +block Add "Output the sum of the two inputs" + extends Interfaces.SI2SO; + +/* +parameter section +*/ + parameter Real k1=+1 "Gain of input signal 1"; + parameter Real k2=+1 "Gain of input signal 2"; + +// equation section +equation + y = k1*u1 + k2*u2; + annotation ( + Documentation(info=" +
+Some documentation. +
+")); + +end Add;