Create parser.v
This commit is contained in:
+1
-3
@@ -1,5 +1,3 @@
|
||||
module main
|
||||
|
||||
import os
|
||||
|
||||
fn read_stdin() []string {
|
||||
@@ -16,5 +14,5 @@ fn read_stdin() []string {
|
||||
|
||||
fn main() {
|
||||
lines := read_stdin()
|
||||
println(lines)
|
||||
println(parse(lines))
|
||||
}
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
fn parse(lines []string) string {
|
||||
mut output := ''
|
||||
for _, line in lines {
|
||||
output += line + '\n'
|
||||
}
|
||||
return output
|
||||
}
|
||||
Reference in New Issue
Block a user