Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parser change #15

Merged
merged 6 commits into from
Mar 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading