# File lib/Getopt/Declare.rb, line 31
def valid_syntax?(code, fname = 'parser_code')
  eval("BEGIN {return true}\n#{code}", nil, fname, 0)
rescue Exception
  false
end