Commit Graph

38 Commits

Author SHA1 Message Date
Dan Onoshko
ef7b77e5da Classes fixes. 2014-08-20 18:53:54 +07:00
Dan Onoshko
8797d5cc0c Classes are done. 2014-08-20 02:32:57 +07:00
Onoshko Dan
ad70d58e83 Class translation still in progress. 2014-08-17 16:39:57 +07:00
Onoshko Dan
7f13870213 Class translation in progress. 2014-08-17 09:18:40 +07:00
Onoshko Dan
73fbeb2377 Some fixes. Class translation spec is done. 2014-08-16 22:40:23 +07:00
Onoshko Dan
0585a8eb8f Dotal getters and setters definition is done.
covert int get Math.rand() => 123;
		covert int set Math.rand(int val) => console.log(val);

		to

		_ColaRuntime$$updateProperty(Math, "rand", {
    		get: function rand() {
        		return 123;
        	},
        	configurable: true
    	});

    	_ColaRuntime$$updateProperty(Math, "rand", {
        	set: function rand() {
          		var val = arguments[0] !== undefined ? arguments[0] :
_ColaRuntime$$error("Argument `val` is required!");
        		return console.log(val);
    		},
    		configurable: true
		});
2014-08-16 18:52:15 +07:00
Onoshko Dan
8e3914de57 Var and func def modificators.
covert int Math.some() => 123;

to

Object.defineProperty(Math, "some", {
    value: function some() {
        return 123;
    },
    writable: true
});
2014-08-16 13:21:45 +07:00
Onoshko Dan
1d297d9248 Negate and modulo array accessors are done.
arr[-1]; // last element

int index = -10;
arr[%index] = 34; // arr[index %% arr.length];
2014-08-15 17:45:46 +07:00
Onoshko Dan
aec283f0b4 operator ? to sign an argument as not-required
int sqr(int x) => x ** 2;

sqr(2); // 4
sqr();  // Exception

int sqrt(int x?) => x ** 2;
sqr();  // NaN
2014-08-15 04:19:06 +07:00
Onoshko Dan
c9f4a2cd12 Conditional Accessor is done. 2014-08-15 03:34:04 +07:00
Onoshko Dan
c3df8f1d3f Progress
- Use inline `isset` expression instead function. status: done
- Use inline `is`. status: done
- `some is NaN` to `isNaN(some)`. status: done
- operator `?` instead `isset`. status: done
- rename runtime prefix `$_cola` to `_ColaRuntime$$`. status: done
- dotal names of refs: done
2014-08-14 20:05:38 +07:00
Onoshko Dan
bd86f0d5ce type check progress 2014-07-29 01:51:41 +07:00
Onoshko Dan
a46c1f21a0 Some refactoring. 2014-06-12 02:14:01 +07:00
Onoshko Dan
efe3183540 Some recoding. 2014-06-01 03:21:52 +07:00
Onoshko Dan
3e4589b331 Prepare code to the static typing. 2014-06-01 03:14:13 +07:00
Onoshko Dan
53df087ee9 Additional source using fixed. 2014-05-26 19:43:41 +07:00
Onoshko Dan
a91ec70cfa fixes 2014-05-24 01:13:43 +07:00
Onoshko Dan
9a72bc48d0 Browser-Cola fixed. 2014-05-24 00:00:21 +07:00
Onoshko Dan
1382b1c8e9 :: prototype accessor done. npm published. 2014-05-23 17:14:16 +07:00
Onoshko Dan
00623e5e4c Browser-Cola added. 2014-05-22 22:44:11 +07:00
Onoshko Dan
fb8ccc644f @require and @include done. 2014-05-22 01:01:32 +07:00
Onoshko Dan
3a8f96a40e switch done 2014-05-19 16:58:17 +07:00
Onoshko Dan
dd22a18eb0 Multiple assignment done. 2014-05-16 19:27:51 +07:00
Onoshko Dan
af6f8ebf7b Cascade operator added, function arguments fixed. 2014-05-03 18:40:47 +07:00
Onoshko Dan
50ff6c272c Functions features completed. 2014-04-28 03:30:25 +07:00
Onoshko Dan
3ce0b42fd7 Binding toplevel main functions to onload event. 2014-04-24 00:05:34 +07:00
Onoshko Dan
f88a7e12d9 Array sugar added. 2014-04-22 20:33:43 +07:00
Onoshko Dan
b2bffc40cd Array arr[] operator added. 2014-04-21 01:56:47 +07:00
Onoshko Dan
7bdb095cee New features added.
Operator `clone` and anonymous function definition `(){}`.
2014-04-20 14:31:03 +07:00
Onoshko Dan
e1a702e9a1 new syntax added
`some?? || isset some`, `Type some, some2`, `a ? b`
2014-04-19 01:27:47 +07:00
Onoshko Dan
2f11d32a70 Adding std functions if need. 2014-04-18 13:10:20 +07:00
Onoshko Dan
ea892ef28c Refactoring over! 2014-04-17 23:21:45 +07:00
Onoshko Dan
10db7a5ef4 Refactoring
step 1
2014-04-16 23:43:40 +07:00
Onoshko Dan
363019dc5a use transform insted treewalker 2014-04-15 21:48:09 +07:00
Onoshko Dan
a2f7a07c11 license updated 2014-04-15 19:57:14 +07:00
Onoshko Dan
f856b3f949 license updated 2014-04-15 19:47:04 +07:00
Onoshko Dan
b7d220ae12 First step is done.
index.html - playground
2014-04-15 17:52:01 +07:00
Onoshko Dan
b5dd0a9774 Going to ColaScript!!!
Start work on ColaScript translator.
2014-04-14 10:35:26 +07:00