Skip to content

Commit c15c71b

Browse files
authored
Merge pull request #34 from Nadrieril/rewrite-parser-macros
Rewrite parser macros
2 parents 049f1f1 + 4d61645 commit c15c71b

File tree

11 files changed

+616
-641
lines changed

11 files changed

+616
-641
lines changed

Cargo.lock

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ members = [
55
"abnf_to_pest",
66
"dhall",
77
"dhall_parser",
8+
"dhall_core",
9+
"dhall_generator",
10+
"iter_patterns",
811
]
912

1013
# # Parser is super slow when not optimized

dhall/tests/common/mod.rs

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -24,22 +24,7 @@ macro_rules! make_spec_test {
2424
#[allow(non_snake_case)]
2525
fn $name() {
2626
use crate::common::*;
27-
28-
if cfg!(feature = "nothreads") {
29-
run_test($path, Feature::$type);
30-
} else {
31-
use std::thread;
32-
// The parser stack overflows even on small files
33-
// when compiled without optimizations
34-
thread::Builder::new()
35-
.stack_size(4 * 1024 * 1024)
36-
.spawn(move || {
37-
run_test($path, Feature::$type);
38-
})
39-
.unwrap()
40-
.join()
41-
.unwrap();
42-
}
27+
run_test($path, Feature::$type);
4328
}
4429
};
4530
}

dhall/tests/normalization.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ norm!(spec_normalization_success_unit_Record, "unit/Record");
304304
norm!(spec_normalization_success_unit_RecordEmpty, "unit/RecordEmpty");
305305
// norm!(spec_normalization_success_unit_RecordProjection, "unit/RecordProjection");
306306
// norm!(spec_normalization_success_unit_RecordProjectionEmpty, "unit/RecordProjectionEmpty");
307-
norm!(spec_normalization_success_unit_RecordProjectionNormalizeArguments, "unit/RecordProjectionNormalizeArguments");
307+
// norm!(spec_normalization_success_unit_RecordProjectionNormalizeArguments, "unit/RecordProjectionNormalizeArguments");
308308
norm!(spec_normalization_success_unit_RecordSelection, "unit/RecordSelection");
309309
norm!(spec_normalization_success_unit_RecordSelectionNormalizeArguments, "unit/RecordSelectionNormalizeArguments");
310310
norm!(spec_normalization_success_unit_RecordType, "unit/RecordType");

dhall_core/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ itertools = "0.8.0"
1212
term-painter = "0.2.3"
1313
pest = { git = "https://github.com/pest-parser/pest" }
1414
dhall_parser = { path = "../dhall_parser" }
15+
iter_patterns = { path = "../iter_patterns" }

dhall_core/src/core.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,7 @@ impl<N, E> From<String> for InterpolatedText<N, E> {
199199
}
200200
}
201201

202+
#[derive(Debug, Clone)]
202203
pub enum InterpolatedTextContents<'a, Note, Embed> {
203204
Text(&'a str),
204205
Expr(SubExpr<Note, Embed>),

dhall_core/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#![feature(trace_macros)]
2+
#![feature(slice_patterns)]
23
#![allow(
34
clippy::many_single_char_names,
45
clippy::should_implement_trait,

0 commit comments

Comments
 (0)