parent
4ed8ac2e86
commit
f34d7e834d
@ -619,6 +619,14 @@ fn keyword_or_command(
|
||||
return flush(i);
|
||||
}
|
||||
let word = &horizon[i..i+len];
|
||||
if word == b"[[" {
|
||||
return WhatNow{
|
||||
tri: Transition::Push(Box::new(
|
||||
SitVec{terminator: vec!{b']', b']'}, color: 0x00007fff}
|
||||
)),
|
||||
pre: i, len: len, alt: None
|
||||
};
|
||||
}
|
||||
match KEYWORDS_SORTED.binary_search(&word) {
|
||||
Ok(_) => WhatNow{
|
||||
tri: Transition::Push(Box::new(SitExtent{
|
||||
|
18
test/expected/control_structures.bash
Normal file
18
test/expected/control_structures.bash
Normal file
@ -0,0 +1,18 @@
|
||||
if [[ -v $julenissen ]]; then
|
||||
[[ $julenissen ]] || [[ $kake ]] || exit 1
|
||||
env [[ He is a "$n"åså ]]
|
||||
a a a a | a a a a ; a a a a & a a a a
|
||||
fi
|
||||
|
||||
# Comment above command
|
||||
true
|
||||
|
||||
if true; then true true; fi
|
||||
|
||||
echo It is not possible \
|
||||
# FIXME \
|
||||
echo to comment between args
|
||||
|
||||
if test -e julenissen; then echo ja; elif test -e kake; then echo ok; else echo nei; fi
|
||||
for i in "$a"; do echo "$i"; done
|
||||
case "$PATH" in *"$HOME"*) echo homeopath;; esac
|
5
test/expected/unexpected_eof_doublebracket.bash
Normal file
5
test/expected/unexpected_eof_doublebracket.bash
Normal file
@ -0,0 +1,5 @@
|
||||
[[
|
||||
[m
|
||||
test/original/unexpected_eof_doublebracket.bash: Unexpected end of file
|
||||
The file's end was reached without closing all sytactic scopes.
|
||||
Either, the parser got lost, or the file is truncated or malformed.
|
18
test/original/control_structures.bash
Normal file
18
test/original/control_structures.bash
Normal file
@ -0,0 +1,18 @@
|
||||
if [[ -v $julenissen ]]; then
|
||||
[[ $julenissen ]] || [[ $kake ]] || exit 1
|
||||
env [[ He is a $nåså ]]
|
||||
a a a a | a a a a ; a a a a & a a a a
|
||||
fi
|
||||
|
||||
# Comment above command
|
||||
true
|
||||
|
||||
if true; then true true; fi
|
||||
|
||||
echo It is not possible \
|
||||
# FIXME \
|
||||
echo to comment between args
|
||||
|
||||
if test -e julenissen; then echo ja; elif test -e kake; then echo ok; else echo nei; fi
|
||||
for i in $a; do echo $i; done
|
||||
case $PATH in *"$HOME"*) echo homeopath;; esac
|
1
test/original/unexpected_eof_doublebracket.bash
Normal file
1
test/original/unexpected_eof_doublebracket.bash
Normal file
@ -0,0 +1 @@
|
||||
[[
|
Loading…
Reference in New Issue
Block a user