gw.lang.parser.exceptions.ParseResultsException: prog.gosu
Errors:
Syntax error. [line:3 col:12] in
line 2:
line 3: var result = switch (day) {
line 4: case "Monday" -> "Start of the work week"
Line Number: 3 Column: 12
Syntax error. [line:3 col:12] in
line 2:
line 3: var result = switch (day) {
line 4: case "Monday" -> "Start of the work week"
Line Number: 3 Column: 12
Expecting ':' to close "case" expression. [line:4 col:8] in
line 3: var result = switch (day) {
line 4: case "Monday" -> "Start of the work week"
line 5: case "Friday" -> "End of the work week"
Line Number: 4 Column: 8
Expecting ':' to close "case" expression. [line:5 col:8] in
line 4: case "Monday" -> "Start of the work week"
line 5: case "Friday" -> "End of the work week"
line 6: case "Saturday", "Sunday" -> "Weekend!"
Line Number: 5 Column: 8
Expecting ':' to close "case" expression. [line:6 col:8] in
line 5: case "Friday" -> "End of the work week"
line 6: case "Saturday", "Sunday" -> "Weekend!"
line 7: default -> "Midweek"
Line Number: 6 Column: 8
Expecting ':' to close "case" expression. [line:7 col:3] in
line 6: case "Saturday", "Sunday" -> "Weekend!"
line 7: default -> "Midweek"
line 8: }
Line Number: 7 Column: 3
Unexpected token: '->' [line:4 col:17] in
line 3: var result = switch (day) {
line 4: case "Monday" -> "Start of the work week"
line 5: case "Friday" -> "End of the work week"
Line Number: 4 Column: 17
Unexpected token: '"' [line:4 col:20] in
line 3: var result = switch (day) {
line 4: case "Monday" -> "Start of the work week"
line 5: case "Friday" -> "End of the work week"
Line Number: 4 Column: 20
Unexpected token: '->' [line:5 col:17] in
line 4: case "Monday" -> "Start of the work week"
line 5: case "Friday" -> "End of the work week"
line 6: case "Saturday", "Sunday" -> "Weekend!"
Line Number: 5 Column: 17
Unexpected token: '"' [line:5 col:20] in
line 4: case "Monday" -> "Start of the work week"
line 5: case "Friday" -> "End of the work week"
line 6: case "Saturday", "Sunday" -> "Weekend!"
Line Number: 5 Column: 20
Unexpected token: ',' [line:6 col:18] in
line 5: case "Friday" -> "End of the work week"
line 6: case "Saturday", "Sunday" -> "Weekend!"
line 7: default -> "Midweek"
Line Number: 6 Column: 18
Unexpected token: '"' [line:6 col:20] in
line 5: case "Friday" -> "End of the work week"
line 6: case "Saturday", "Sunday" -> "Weekend!"
line 7: default -> "Midweek"
Line Number: 6 Column: 20
Unexpected token: '->' [line:6 col:29] in
line 5: case "Friday" -> "End of the work week"
line 6: case "Saturday", "Sunday" -> "Weekend!"
line 7: default -> "Midweek"
Line Number: 6 Column: 29
Unexpected token: '"' [line:6 col:32] in
line 5: case "Friday" -> "End of the work week"
line 6: case "Saturday", "Sunday" -> "Weekend!"
line 7: default -> "Midweek"
Line Number: 6 Column: 32
Unexpected token: '->' [line:7 col:11] in
line 6: case "Saturday", "Sunday" -> "Weekend!"
line 7: default -> "Midweek"
line 8: }
Line Number: 7 Column: 11
Unexpected token: '"' [line:7 col:14] in
line 6: case "Saturday", "Sunday" -> "Weekend!"
line 7: default -> "Midweek"
line 8: }
Line Number: 7 Column: 14
Could not resolve symbol for : result [line:9 col:7] in
line 8: }
line 9: print(result)
line 10:
Expected Type: Object
Line Number: 9 Column: 7
at gw.internal.gosu.parser.ParserBase.verifyParsedElement(ParserBase.java:292)
at gw.internal.gosu.parser.ParserBase.verifyParsedElement(ParserBase.java:263)
at gw.internal.gosu.parser.GosuClassParser.parseDefinitions(GosuClassParser.java:475)
at gw.internal.gosu.parser.GosuClass.compileDefinitionsIfNeeded(GosuClass.java:1551)
at gw.internal.gosu.parser.GosuClass.compileDefinitionsIfNeeded(GosuClass.java:1494)
at gw.internal.gosu.parser.GosuClass.isValid(GosuClass.java:925)
at gw.internal.gosu.parser.GosuProgram_Proxy.isValid(gw.internal.gosu.parser.GosuProgram_Proxy:2)
at gw.internal.gosu.parser.GosuProgramParser.parseExpressionOrProgram(GosuProgramParser.java:229)
at gw.lang.Gosu.runWithFile(Gosu.java:621)
at gw.lang.Gosu.start(Gosu.java:140)
at gw.lang.Gosu.main(Gosu.java:70)