Use $ to identify streams instead of [] (#79)

This commit is contained in:
vms
2021-03-26 17:13:28 +03:00
committed by GitHub
parent 9bdd2e3501
commit 45fc92ae3d
41 changed files with 1257 additions and 1017 deletions

View File

@ -148,7 +148,7 @@ fn lexical_error_to_label(file_id: usize, error: LexerError) -> Label<usize> {
IsNotAlphanumeric(start, end) => {
Label::primary(file_id, start..end).with_message(error.to_string())
}
EmptyAccName(start, end) => {
EmptyStreamName(start, end) => {
Label::primary(file_id, start..end).with_message(error.to_string())
}
EmptyVariableOrConst(start, end) => {
@ -175,16 +175,6 @@ fn lexical_error_to_label(file_id: usize, error: LexerError) -> Label<usize> {
}
}
pub(super) fn into_variable_and_path(str: &str, pos: usize, should_flatten: bool) -> (&str, &str) {
let json_path = if should_flatten {
&str[pos + 1..str.len() - 1]
} else {
&str[pos + 1..]
};
(&str[0..pos], json_path)
}
pub(super) fn make_flattened_error(
start_pos: usize,
token: Token<'_>,