index 0b6e122bf926f8497d5d1c3a9fa3165d2620a110..3d9b7b372142f823d406cb25db5a487d9475f16c 100755 (executable)
lastCommand = nil
lexPath(d) do |token, isCommand|
+ raise 'Invalid number of parameters' if command and isCommand
+
unless command
if isCommand
raise 'Invalid path, must begin with moveto.' \
end
end
outputCommand = command.upcase
- else
- raise 'Invalid number of parameters' if isCommand
+ end
+
+ unless isCommand
param = token.send PATHDEFS[outputCommand].casts[params.length]
if command =~ /[a-z]/
case PATHDEFS[outputCommand].coord_types[params.length]