Revert "WIP"
This reverts commit ef8530b15e34de2a4eb2f62200dfed874dacdf8f.
This commit is contained in:
parent
da7144ccb0
commit
1d099f7405
|
@ -2849,9 +2849,7 @@ pub fn parse_string_strict(working_set: &mut StateWorkingSet, span: Span) -> Exp
|
||||||
trace!("parsing: string, with required delimiters");
|
trace!("parsing: string, with required delimiters");
|
||||||
|
|
||||||
let bytes = working_set.get_span_contents(span);
|
let bytes = working_set.get_span_contents(span);
|
||||||
if bytes[0] != b'\'' && bytes[0] != b'"' && bytes[0] != b'`' && bytes.contains(&b'(') {
|
|
||||||
return parse_string_interpolation(working_set, span);
|
|
||||||
}
|
|
||||||
// Check for unbalanced quotes:
|
// Check for unbalanced quotes:
|
||||||
{
|
{
|
||||||
let bytes = if bytes.starts_with(b"$") {
|
let bytes = if bytes.starts_with(b"$") {
|
||||||
|
@ -2871,7 +2869,6 @@ pub fn parse_string_strict(working_set: &mut StateWorkingSet, span: Span) -> Exp
|
||||||
|
|
||||||
let (bytes, quoted) = if (bytes.starts_with(b"\"") && bytes.ends_with(b"\"") && bytes.len() > 1)
|
let (bytes, quoted) = if (bytes.starts_with(b"\"") && bytes.ends_with(b"\"") && bytes.len() > 1)
|
||||||
|| (bytes.starts_with(b"\'") && bytes.ends_with(b"\'") && bytes.len() > 1)
|
|| (bytes.starts_with(b"\'") && bytes.ends_with(b"\'") && bytes.len() > 1)
|
||||||
|| (bytes.starts_with(b"`") && bytes.ends_with(b"`") && bytes.len() > 1)
|
|
||||||
{
|
{
|
||||||
(&bytes[1..(bytes.len() - 1)], true)
|
(&bytes[1..(bytes.len() - 1)], true)
|
||||||
} else if (bytes.starts_with(b"$\"") && bytes.ends_with(b"\"") && bytes.len() > 2)
|
} else if (bytes.starts_with(b"$\"") && bytes.ends_with(b"\"") && bytes.len() > 2)
|
||||||
|
@ -4672,7 +4669,7 @@ pub fn parse_value(
|
||||||
SyntaxShape::Filepath => parse_filepath(working_set, span),
|
SyntaxShape::Filepath => parse_filepath(working_set, span),
|
||||||
SyntaxShape::Directory => parse_directory(working_set, span),
|
SyntaxShape::Directory => parse_directory(working_set, span),
|
||||||
SyntaxShape::GlobPattern => parse_glob_pattern(working_set, span),
|
SyntaxShape::GlobPattern => parse_glob_pattern(working_set, span),
|
||||||
SyntaxShape::String => parse_string_strict(working_set, span),
|
SyntaxShape::String => parse_string(working_set, span),
|
||||||
SyntaxShape::Binary => parse_binary(working_set, span),
|
SyntaxShape::Binary => parse_binary(working_set, span),
|
||||||
SyntaxShape::Signature => {
|
SyntaxShape::Signature => {
|
||||||
if bytes.starts_with(b"[") {
|
if bytes.starts_with(b"[") {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user