Check-in [5081139836]
Not logged in
Overview
SHA1 Hash:50811398367b9c09b57bdaf8646de6090dc7dd4a
Date: 2010-11-09 15:22:01
User: kinaba
Comment:removed BOM from the source file (fxxk poseidon!!!)
Timelines: family | ancestors | descendants | both | trunk
Downloads: Tarball | ZIP archive
Other Links: files | file ages | manifest
Tags And Properties
Changes

Modified polemy/_common.d from [5141868f3bc27248] to [0d687b04437e837f].

1 /** | 1 /** 2 * Authors: k.inaba 2 * Authors: k.inaba 3 * License: NYSL 0.9982 http://www.kmonos.net/nysl/ 3 * License: NYSL 0.9982 http://www.kmonos.net/nysl/ 4 * 4 * 5 * "Always-opend" modules inside Polemy. 5 * "Always-opend" modules inside Polemy. 6 */ 6 */ 7 module polemy._common; 7 module polemy._common; 8 public import std.array; 8 public import std.array;

Modified polemy/parse.d from [c3f339e53d35901f] to [86eb0091d67bd45b].

1 /** | 1 /** 2 * Authors: k.inaba 2 * Authors: k.inaba 3 * License: NYSL 0.9982 http://www.kmonos.net/nysl/ 3 * License: NYSL 0.9982 http://www.kmonos.net/nysl/ 4 * 4 * 5 * Parser for Polemy programming language 5 * Parser for Polemy programming language 6 */ 6 */ 7 module polemy.parse; 7 module polemy.parse; 8 import polemy._common; 8 import polemy._common; ................................................................................................................................................................................ 187 return new FuncallExpression(pos, 187 return new FuncallExpression(pos, 188 new VarExpression(pos, "if"), 188 new VarExpression(pos, "if"), 189 cond, 189 cond, 190 new FunLiteral(thenPos, [], th), 190 new FunLiteral(thenPos, [], th), 191 new FunLiteral(elsePos, [], el) 191 new FunLiteral(elsePos, [], el) 192 ); 192 ); 193 } 193 } 194 if( tryEat("fun") || tryEat("λ") ) | 194 if( tryEat("fun") || tryEat("ƒÉ") ) 195 { 195 { 196 eat("(", "after fun"); 196 eat("(", "after fun"); 197 string[] params; 197 string[] params; 198 while( !tryEat(")") ) 198 while( !tryEat(")") ) 199 { 199 { 200 params ~= eatId("for function parameter"); 200 params ~= eatId("for function parameter"); 201 if( !tryEat(",") ) { 201 if( !tryEat(",") ) { ................................................................................................................................................................................ 255 { 255 { 256 mixin EasyAST; 256 mixin EasyAST; 257 257 258 assert_eq(parseString(`123`), intl(123)); 258 assert_eq(parseString(`123`), intl(123)); 259 assert_eq(parseString(`"foo"`), strl("foo")); 259 assert_eq(parseString(`"foo"`), strl("foo")); 260 assert_eq(parseString(`fun(){1}`), fun([],intl(1))); 260 assert_eq(parseString(`fun(){1}`), fun([],intl(1))); 261 assert_eq(parseString(`fun(x){1}`), fun(["x"],intl(1))); 261 assert_eq(parseString(`fun(x){1}`), fun(["x"],intl(1))); 262 assert_eq(parseString(`λ(){1}`), fun([],intl(1))); | 262 assert_eq(parseString(`ƒÉ(){1}`), fun([],intl(1))); 263 assert_eq(parseString(`λ(x){1}`), fun(["x"],intl(1))); | 263 assert_eq(parseString(`ƒÉ(x){1}`), fun(["x"],intl(1))); 264 assert_eq(parseString(`1;2`), let("_","@val",intl(1),intl(2))); 264 assert_eq(parseString(`1;2`), let("_","@val",intl(1),intl(2))); 265 assert_eq(parseString(`1;2;`), let("_","@val",intl(1),intl(2))); 265 assert_eq(parseString(`1;2;`), let("_","@val",intl(1),intl(2))); 266 assert_eq(parseString(`let x=1;2`), let("x","@val",intl(1),intl(2))); 266 assert_eq(parseString(`let x=1;2`), let("x","@val",intl(1),intl(2))); 267 assert_eq(parseString(`var x=1;2;`), let("x","@val",intl(1),intl(2))); 267 assert_eq(parseString(`var x=1;2;`), let("x","@val",intl(1),intl(2))); 268 assert_eq(parseString(`def x=1`), let("x","@val",intl(1),var("x"))); 268 assert_eq(parseString(`def x=1`), let("x","@val",intl(1),var("x"))); 269 assert_eq(parseString(`@val x=1;`), let("x","@val",intl(1),var("x"))); 269 assert_eq(parseString(`@val x=1;`), let("x","@val",intl(1),var("x"))); 270 assert_eq(parseString(`@typ x="#int";`), let("x","@typ",strl("#int"),var 270 assert_eq(parseString(`@typ x="#int";`), let("x","@typ",strl("#int"),var