Skip to content

Commit c3c8e0d

Browse files
authored
ci (#1)
1 parent dd55428 commit c3c8e0d

File tree

4 files changed

+50
-46
lines changed

4 files changed

+50
-46
lines changed

.github/workflows/rust.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Rust
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
env:
12+
CARGO_TERM_COLOR: always
13+
14+
jobs:
15+
build:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v5
19+
20+
- run: rustup install nightly && rustup default nightly && rustup component add rustfmt clippy
21+
22+
- run: cargo +nightly fmt --check
23+
24+
- run: cargo +nightly clippy --all-targets --all-features
25+
26+
- run: cargo +nightly build
27+
28+
- run: cargo +nightly test

.gitlab-ci.yaml

Lines changed: 0 additions & 33 deletions
This file was deleted.

kfl/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ readme = "README.md"
1313

1414
[dependencies]
1515
kfl-derive = { path = "../kfl-derive", version = "0", optional = true }
16-
chumsky = { version = "1.0.0-alpha.7" }
16+
chumsky = { version = "= 1.0.0-alpha.7" }
1717
thiserror = "2"
1818
miette = "7"
1919

kfl/src/grammar.rs

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -128,10 +128,13 @@ fn ml_comment<'a>() -> impl Parser<'a, I<'a>, (), Extra> + Clone {
128128
})
129129
.map_err_with_state(|err, span, _| {
130130
let span = Span::from(span);
131-
if matches!(&err, ParseError::Unexpected {
132-
found: TokenFormat::Eoi,
133-
..
134-
}) && span.len() > 2
131+
if matches!(
132+
&err,
133+
ParseError::Unexpected {
134+
found: TokenFormat::Eoi,
135+
..
136+
}
137+
) && span.len() > 2
135138
{
136139
err.merge(ParseError::Unclosed {
137140
label: "comment",
@@ -254,10 +257,13 @@ fn escaped_string<'a>() -> impl Parser<'a, I<'a>, Box<str>, Extra> + Clone {
254257
)
255258
.then_ignore(just('"'))
256259
.map_err_with_state(|err: ParseError, span, _| {
257-
if matches!(&err, ParseError::Unexpected {
258-
found: TokenFormat::Eoi,
259-
..
260-
}) {
260+
if matches!(
261+
&err,
262+
ParseError::Unexpected {
263+
found: TokenFormat::Eoi,
264+
..
265+
}
266+
) {
261267
err.merge(ParseError::Unclosed {
262268
label: "string",
263269
opened_at: Span(span.start, span.start + 1), //span.before_start(1),
@@ -393,10 +399,13 @@ fn nodes<'a>() -> impl Parser<'a, I<'a>, Vec<Node>, Extra> {
393399
recursive(|nodes| {
394400
let braced_nodes = just('{').ignore_then(nodes.then_ignore(just('}')).map_err_with_state(
395401
|err, span, _| {
396-
if matches!(&err, ParseError::Unexpected {
397-
found: TokenFormat::Eoi,
398-
..
399-
}) {
402+
if matches!(
403+
&err,
404+
ParseError::Unexpected {
405+
found: TokenFormat::Eoi,
406+
..
407+
}
408+
) {
400409
let span = Span::from(span);
401410
err.merge(ParseError::Unclosed {
402411
label: "curly braces",

0 commit comments

Comments
 (0)