This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Iterable<Map<String,int>>parseCSV(String csv) { | |
return csv.split("\n").map((String s) { | |
List<String> kv = s.split(","); | |
String k = kv[0]; | |
num v = int.parse(kv[1]); | |
return {k: v}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import "dart:math"; | |
List<List<String>> csv; | |
void main() { | |
csv = [ | |
["1", "Orange", "3"], | |
["2", "Apple", "4"], | |
["3", "Lemon", "4"], | |
["42", "Grapes", "6"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void parse_expr(Value *dest); | |
Sym *parse_ident(void) { | |
if (tok != TOK_IDENT) { | |
error("Expected identifier"); | |
} | |
Sym *ident = tok_sym; | |
next(); | |
return ident; | |
} |