-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The migration is motivated by very poor performance of Python implementation. This was caused partially by the ANTLR parser having a general runtime that couldn't be tailored in any way, and mainly because of the inherent slowness of Python. New Rust implementation was around 50x faster. After including better and more detailed heuristics it is still between 30-40x faster without any performance tweaks. This both creates significant performance savings that can be spent in the future on more advanced features like HTML formatting, and opens possibilities of performance gains through multithreading etc. Few long existing bugs were fixed along the way. There are some minor changes in the style applied by `mofmt`. Refer to the `code-style.md`. Fixes #26 Fixes #27
- Loading branch information
Showing
62 changed files
with
3,838 additions
and
30,284 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: CI | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
jobs: | ||
|
||
format: | ||
name: Rustfmt | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: dtolnay/rust-toolchain@master | ||
with: | ||
toolchain: stable | ||
components: rustfmt | ||
- run: cargo fmt --all --check | ||
|
||
clippy: | ||
name: Clippy | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: dtolnay/rust-toolchain@master | ||
with: | ||
toolchain: stable | ||
components: clippy | ||
- run: cargo clippy --workspace --all-features -- -D warnings | ||
|
||
build_and_test_linux: | ||
name: Build and Test (Linux) | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: dtolnay/rust-toolchain@stable | ||
with: | ||
toolchain: stable | ||
run: cargo test --all-targets | ||
|
||
build_and_test_win: | ||
name: Build and Test (Windows) | ||
runs-on: windows-latest | ||
timeout-minutes: 10 | ||
steps: | ||
- name: Prepare symlink configuration | ||
run: git config --global core.symlinks true | ||
|
||
- uses: actions/checkout@v3 | ||
- uses: dtolnay/rust-toolchain@stable | ||
with: | ||
toolchain: stable | ||
run: cargo test --all-targets |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
[package] | ||
name = "mofmt" | ||
description = "Modelica language formatter" | ||
authors = ["Eryk Mroczek <[email protected]>"] | ||
version = "0.4.0" | ||
edition = "2021" | ||
license = "MPL-2.0" | ||
readme = "README.md" | ||
repository = "https://github.com/ErykMroczek/mofmt" | ||
keywords = ["Modelica", "development", "formatter"] | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
||
[dependencies] | ||
moparse = "0.1.4-rc4" |
Oops, something went wrong.