wduquette / molt

Embeddable TCL Interpreter for Rust applications
BSD 3-Clause "New" or "Revised" License
103 stars 12 forks source link

List parsing terminates on semi-colon #43

Closed wduquette closed 4 years ago

wduquette commented 4 years ago

The list parser's parse_list method use while !ctx.at_end_of_command() to iterate through the list to be parsed. This works fine unless a list element begins with a semicolon:

% set a {a b ;c d}
a b ;c d
% foreach item $a {puts $item}
a
b
%