File tree Expand file tree Collapse file tree 3 files changed +24
-1
lines changed Expand file tree Collapse file tree 3 files changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -106,7 +106,7 @@ def scan_tokens tokens, options
106
106
kind = :shell
107
107
elsif match = scan ( PRE_CONSTANTS )
108
108
kind = :pre_constant
109
- elsif match = scan ( /[^\s ]*[A-Za-z_][A-Za-z_0-9]*\+ ?=/ )
109
+ elsif match = scan ( /[^\s '" ]*[A-Za-z_][A-Za-z_0-9]*\+ ?=/ )
110
110
match =~ /(.*?)([A-Za-z_][A-Za-z_0-9]*)(\+ ?=)/
111
111
str = $1
112
112
pre = $2
Original file line number Diff line number Diff line change 1
1
#! /bin/sh
2
2
3
+ perl -e' s/to=5/to=10/' /test/file
3
4
echo " Parsed at <%= Time.now %>"
4
5
echo " Executed at ` Date` "
5
6
command ' open quote
Original file line number Diff line number Diff line change @@ -20,6 +20,17 @@ def test_0010_ErbBash
20
20
[ [ "#!/bin/sh" , :directive ] ,
21
21
[ "\n " , :end_line ] ,
22
22
[ "\n " , :end_line ] ,
23
+ [ "perl" , :ident ] ,
24
+ [ " " , :space ] ,
25
+ [ "-" , :operator ] ,
26
+ [ "e" , :ident ] ,
27
+ [ "'s/to=5/to=10/'" , :string ] ,
28
+ [ " " , :space ] ,
29
+ [ "/" , :plain ] ,
30
+ [ "test" , :method ] ,
31
+ [ "/" , :plain ] ,
32
+ [ "file" , :ident ] ,
33
+ [ "\n " , :end_line ] ,
23
34
[ "echo" , :method ] ,
24
35
[ " " , :space ] ,
25
36
[ :open , :string ] ,
@@ -61,6 +72,17 @@ def test_0011_ErbBash_Ignoring_Errors
61
72
[ [ "#!/bin/sh" , :directive ] ,
62
73
[ "\n " , :end_line ] ,
63
74
[ "\n " , :end_line ] ,
75
+ [ "perl" , :ident ] ,
76
+ [ " " , :space ] ,
77
+ [ "-" , :operator ] ,
78
+ [ "e" , :ident ] ,
79
+ [ "'s/to=5/to=10/'" , :string ] ,
80
+ [ " " , :space ] ,
81
+ [ "/" , :plain ] ,
82
+ [ "test" , :method ] ,
83
+ [ "/" , :plain ] ,
84
+ [ "file" , :ident ] ,
85
+ [ "\n " , :end_line ] ,
64
86
[ "echo" , :method ] ,
65
87
[ " " , :space ] ,
66
88
[ :open , :string ] ,
You can’t perform that action at this time.
0 commit comments