|
|
@ -34,6 +34,9 @@ func ParseFile(filepath string) (hal.Program, error) { |
|
|
|
func ParseProgram(input []string) (hal.Program, error) { |
|
|
|
func ParseProgram(input []string) (hal.Program, error) { |
|
|
|
program := make(hal.Program) |
|
|
|
program := make(hal.Program) |
|
|
|
for index, line := range input { |
|
|
|
for index, line := range input { |
|
|
|
|
|
|
|
if len(line) == 0 || line[0] == '#' { |
|
|
|
|
|
|
|
continue |
|
|
|
|
|
|
|
} |
|
|
|
args := strings.Split(line, " ") |
|
|
|
args := strings.Split(line, " ") |
|
|
|
if len(args) <= 1 { |
|
|
|
if len(args) <= 1 { |
|
|
|
continue |
|
|
|
continue |
|
|
|