http://pegjs.org/online で試せます。 ルール名とかはリファクタリングしてないです見逃してください! Ruleの後のActionの処理が適当すぎて13とか15の結果がおかしいけどParse自体は正しく行われているようだ。
This file contains hidden or 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
| { | |
| function concat(c, cc) { | |
| var result = [c]; | |
| if (cc) { result = result.concat(cc); } | |
| return result; | |
| } | |
| } | |
| Header | |
| = bom? label:Label projects:Projects authors:Authors repo:Repo .* { return {label, projects, authors, repo}; } |
$ git clone [email protected]:entropiajp/resultoon.git
$ sudo easy_install pip
$ sudo pip install requests
$ brew install tesseract
$ sudo easy_install python_tesseract-0.9.1-py2.7-macosx-10.10-x86_64.egg
$ brew install homebrew/science/opencv3
$ echo /usr/local/opt/opencv3/lib/python2.7/site-packages >> /usr/local/lib/python2.7/site-packages/opencv3.pth
$ mkdir -p /Users/vvakame/Library/Python/2.7/lib/python/site-packages
$ echo 'import site; site.addsitedir("/usr/local/lib/python2.7/site-packages")' >> /Users/vvakame/Library/Python/2.7/lib/python/site-packages/homebrew.pth
This file contains hidden or 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
| abstract class AbstractTest { | |
| } | |
| // Cannot create an instance of the abstract class 'AbstractTest'. | |
| // let obj = new AbstractTest(); | |
| // OK! | |
| let obj = new class extends AbstractTest {} (); | |
| // メソッドもabstractにできる | |
| abstract class Test { | |
| abstract hi(): string; |
actual.
$ tsc -v
message TS6029: Version 1.5.3
$ tsc --module commonjs --declaration index.ts
$ cat index.d.ts
export { bar };
# in TypeScript repo
This file contains hidden or 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
| var json = {}; // use schedule.json | |
| // build data | |
| var schema = {}; | |
| var schemaRev = {}; | |
| var tags = new Set(); | |
| json.sessions.forEach(function(data) { | |
| Object.keys(data).forEach(function(key, i){ | |
| schema[key]=true; | |
| schemaRev[i] = key; | |
| }); |
This file contains hidden or 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
| package net.vvakame.sample; | |
| enum Size { | |
| Short(1), | |
| Medium(2), | |
| Large(3), | |
| ; | |
| int sizeValue; | |
| public Size(int intSize) { | |
| this.sizeValue = intSize; |