mirror of
https://github.com/digarok/radius.git
synced 2024-06-12 11:29:27 +00:00
fixed quotes not triggering operand which made macro variables to split/break apart
This commit is contained in:
parent
22bfce63a4
commit
81849d6e26
|
@ -82,6 +82,10 @@ linenum = 1
|
||||||
source_contents.each_line do |line|
|
source_contents.each_line do |line|
|
||||||
# we catch any issue that causes radius to fail and just print out the line
|
# we catch any issue that causes radius to fail and just print out the line
|
||||||
# that it failed on. not the best, but *shrug*
|
# that it failed on. not the best, but *shrug*
|
||||||
|
# Note, to debug a condition below simply:
|
||||||
|
# puts " "*i +"."
|
||||||
|
# puts line
|
||||||
|
#
|
||||||
begin
|
begin
|
||||||
|
|
||||||
# state machine - resets each line
|
# state machine - resets each line
|
||||||
|
@ -122,7 +126,6 @@ source_contents.each_line do |line|
|
||||||
|
|
||||||
# are we in a quote? print, but also look for matching end quote
|
# are we in a quote? print, but also look for matching end quote
|
||||||
if in_quote
|
if in_quote
|
||||||
##print c
|
|
||||||
buf << c
|
buf << c
|
||||||
x+=1
|
x+=1
|
||||||
if c == quote_char # second quotes
|
if c == quote_char # second quotes
|
||||||
|
@ -177,6 +180,7 @@ source_contents.each_line do |line|
|
||||||
if c == '"' || c == "'"
|
if c == '"' || c == "'"
|
||||||
quote_char = c
|
quote_char = c
|
||||||
in_quote = true
|
in_quote = true
|
||||||
|
in_operand = true
|
||||||
buf << c
|
buf << c
|
||||||
# see if we are starting a line with a comment
|
# see if we are starting a line with a comment
|
||||||
elsif (c == ';' || c == '*') && i == 0
|
elsif (c == ';' || c == '*') && i == 0
|
||||||
|
|
Loading…
Reference in New Issue
Block a user