Skip to content

Commit

Permalink
Merge pull request #15 from jClugstor/parser_change
Browse files Browse the repository at this point in the history
Parser change
  • Loading branch information
ChrisRackauckas authored Mar 11, 2024
2 parents 230e937 + e981e01 commit f376fd6
Show file tree
Hide file tree
Showing 4 changed files with 355 additions and 175 deletions.
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ authors = ["jClugstor <jadonclugston@gmail.com> and contributors"]
version = "1.0.0"

[deps]
Automa = "67c07d97-cdcb-5c2c-af73-a7f9c32a568b"
ModelingToolkit = "961ee093-0014-501f-94e3-6117800e7a78"
ParserCombinator = "fae87a5f-d1ad-5cf0-8f61-c941e1580b46"

[compat]
Aqua = "0.8"
Automa = "1"
ModelingToolkit = "8.75, 9"
SafeTestsets = "0.1"
Test = "1.10"
julia = "1.10"
ParserCombinator = "2"

[extras]
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
Expand Down
7 changes: 4 additions & 3 deletions src/BaseModelica.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module BaseModelica

using ModelingToolkit
using Automa
using ParserCombinator

"""
Holds the name of the package, the models in the package, and eventually BaseModelica records.
Expand Down Expand Up @@ -33,6 +33,7 @@ end
struct BaseModelicaVariable
type::Any
name::Any
input_or_output::Any
description::Any
end

Expand Down Expand Up @@ -67,8 +68,8 @@ parse_basemodelica("testfiles/NewtonCoolingBase.mo")
```
"""
function parse_basemodelica(filename::String)
model = parse_file(filename)
baseModelica_to_ModelingToolkit(model.model)
package = parse_file(filename)
baseModelica_to_ModelingToolkit(package.model)
end

export parse_basemodelica
Expand Down
Loading

0 comments on commit f376fd6

Please sign in to comment.