-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Robert-M-Lucas
committed
Jul 25, 2024
1 parent
312c99c
commit 33fd1f0
Showing
13 changed files
with
197 additions
and
29 deletions.
There are no files selected for viewing
82 changes: 82 additions & 0 deletions
82
.idea/shelf/Uncommitted_changes_before_Update_at_25_07_2024,_16_23_[Changes]/shelved.patch
Large diffs are not rendered by default.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
Binary file not shown.
Binary file not shown.
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 |
---|---|---|
@@ -1,16 +1,27 @@ | ||
struct StructA { | ||
a: StructB | ||
a: int, | ||
b: StructB | ||
} | ||
|
||
struct StructB { | ||
a: StructC | ||
} | ||
|
||
struct StructC { | ||
a: StructB | ||
a: int, | ||
b: int | ||
} | ||
|
||
fn main() -> int { | ||
let y: int = 3; | ||
let y: int = 13; | ||
|
||
@ Test Start | ||
|
||
let x: StructA = StructA { | ||
a: 3, | ||
b: StructB { | ||
a: 5, | ||
b: 4 | ||
} | ||
}; | ||
|
||
@ Test End | ||
|
||
return y; | ||
} |
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
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,40 @@ | ||
use derive_getters::Getters; | ||
use nom::bytes::complete::take_till; | ||
use nom::character::complete::char; | ||
use nom::sequence::Tuple; | ||
use nom_supreme::tag::complete::tag; | ||
use crate::root::parser::parse::{ErrorTree, Location, ParseResult, Span}; | ||
use crate::root::parser::parse_function::parse_evaluable::{EvaluableToken, parse_evaluable}; | ||
use crate::root::parser::parse_function::parse_line::{LineTestFn, LineTokens}; | ||
use crate::root::parser::parse_name::SimpleNameToken; | ||
use crate::root::parser::parse_util::{discard_ignored, require_ignored}; | ||
|
||
#[derive(Debug, Getters)] | ||
pub struct MarkerToken { | ||
value: String, | ||
} | ||
|
||
#[cfg(debug_assertions)] | ||
pub fn test_parse_marker<'a, 'b>(s: Span<'a>) -> ParseResult<Span, LineTestFn<'a, 'b>> { | ||
match (char('@'), require_ignored).parse(s) { | ||
Ok(_) => Ok((s, |x, _| { | ||
parse_marker(x).map(|(s, x)| (s, LineTokens::Marker(x))) | ||
})), | ||
Err(e) => Err(e), | ||
} | ||
} | ||
|
||
#[cfg(debug_assertions)] | ||
pub fn parse_marker(s: Span) -> ParseResult<Span, MarkerToken> { | ||
let (s, _) = char('@')(s)?; | ||
let (s, value) = take_till(|c| c == '\n' || c == '\r')(s)?; | ||
|
||
let (s, _) = discard_ignored(s)?; | ||
|
||
Ok(( | ||
s, | ||
MarkerToken { | ||
value: value.fragment().to_string() | ||
} | ||
)) | ||
} |
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