Skip to content

Commit

Permalink
Merge pull request #49 from mp4096/nom-5
Browse files Browse the repository at this point in the history
The Great Refactor: Migrate to nom 5 and Make Parsers Readable Again
  • Loading branch information
mp4096 committed Jun 10, 2019
2 parents e265e63 + c46ab5b commit cdcb979
Show file tree
Hide file tree
Showing 12 changed files with 1,673 additions and 562 deletions.
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
:warning: Before the 1.0 release, we only document minor releases here!

# 0.5.0-beta
[PR #49](https://github.com/mp4096/indentex/pull/49)

### :warning: Breaking changes

* No backslashes are now allowed in the command name part.

| Indentex source | Transpiled with `0.4.0` | Transpiled with `0.5.0` |
|:-----------------|:--------------------------------|:----------------------------|
| `# foo\bar: baz` | `\foo\bar{baz}` | `\foo\bar{baz}` |
| `# foo\bar:` | `\begin{foo\bar}⏎\end{foo\bar}` | `\begin{foo}\bar⏎\end{foo}` |

### Non-breaking changes

* Migrated to nom 5
* Changed parsing logic
* Refactor code
* Add unit tests

# 0.4.0 (2017-02-18)
Commit 2adba137618d72c0251ddedfbbe01cc076536ce7

Expand Down
149 changes: 98 additions & 51 deletions Cargo.lock

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "indentex"
version = "0.4.0"
version = "0.5.0-beta"
authors = ["Mikhail Pak <code@mp4096.com>", "Hans Kirchner <h.kirchner@tum.de>"]
license = "MIT"
description = "Transpiler for an indentation-based superset of LaTeX"
Expand All @@ -15,7 +15,7 @@ edition = "2018"
clap = "^2.33.0"
globset = "^0.4.2"
ignore = "^0.4.7"
nom = "^3.2.1"
nom = "^5.0.0-beta2"
rayon = "^1.0.2"


Expand All @@ -27,7 +27,7 @@ debug-assertions = false

[package.metadata.deb]
maintainer = "Mikhail Pak <code@mp4096.com>"
copyright = "2016-2018, Mikhail Pak <code@mp4096.com>, Hans Kirchner <h.kirchner@tum.de>"
copyright = "2016-2019, Mikhail Pak <code@mp4096.com>, Hans Kirchner <h.kirchner@tum.de>"
license_file = ["LICENSE.md", "6"]
extended_description = "A transpiler for an indentation-based superset of LaTeX."
depends = "$auto"
Expand Down
4 changes: 2 additions & 2 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
MIT License

Copyright (c) 2016-2018 Mikhail Pak
Copyright (c) 2016-2019 Mikhail Pak

Copyright (c) 2016-2018 Hans Kirchner
Copyright (c) 2016-2019 Hans Kirchner

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ which can be used further in your toolchain, sent to a publisher or your colleag
## Installation

### From source
Please install the latest stable Rust version (≥ 1.30).
Indentex requires Rust 2018 edition. Please install the latest stable Rust version (≥ 1.31.1).

```sh
cargo install --git https://github.com/mp4096/indentex/
Expand All @@ -30,8 +30,8 @@ cargo install --git https://github.com/mp4096/indentex/
Type `indentex -h` for help:

```
indentex 0.4.0
Mikhail Pak <mikhail.pak@tum.de>:Hans Kirchner <h.kirchner@tum.de>
indentex 0.5.0-beta
Mikhail Pak <code@mp4096.com>:Hans Kirchner <h.kirchner@tum.de>
Transpiler for an indentation-based superset of LaTeX
USAGE:
Expand Down
76 changes: 0 additions & 76 deletions src/helper_parsers.rs

This file was deleted.

8 changes: 1 addition & 7 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
#[macro_use]
extern crate nom;

// Import helper macros before `parsers`
#[macro_use]
mod helper_parsers;

mod error;
mod file_utils;
mod parsers;
mod parsing_types;
mod transpile;

enum ReturnCode {
Expand Down

0 comments on commit cdcb979

Please sign in to comment.