Created
May 27, 2013 19:56
-
-
Save ELLIOTTCABLE/5658802 to your computer and use it in GitHub Desktop.
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
Source/Paws.coffee | 5 +++++ | |
Source/parser.coffee | 5 +---- | |
Test/parser.tests.coffee | 2 +- | |
3 files changed, 7 insertions(+), 5 deletions(-) | |
diff --git i/Source/Paws.coffee w/Source/Paws.coffee | |
index 2bf290f..5fb5448 100644 | |
--- i/Source/Paws.coffee | |
+++ w/Source/Paws.coffee | |
@@ -102,3 +102,8 @@ module.exports = Paws = | |
compare: (to) -> | |
to instanceof Label and | |
to.alien.valueOf() == @alien.valueOf() | |
+ | |
+ Execution: class Execution extends Thing | |
+ | |
+ Native: class Native extends Execution | |
+ constructor: (@position) -> | |
diff --git i/Source/parser.coffee w/Source/parser.coffee | |
index 1b04c15..4458c21 100644 | |
--- i/Source/parser.coffee | |
+++ w/Source/parser.coffee | |
@@ -1,9 +1,6 @@ | |
`require = require('./cov_require.js')(require)` | |
Paws = require './Paws.coffee' | |
-class Paws.Execution | |
- constructor: (@body) -> | |
- | |
class SourceRange | |
constructor: (@source, @begin, @end) -> | |
@@ -56,7 +53,7 @@ class Parser | |
@with_range(new constructor(it), start) | |
paren: -> @braces('()', (it) -> it) | |
- scope: -> @braces('{}', Paws.Execution) | |
+ scope: -> @braces('{}', Paws.Native) | |
expr: -> | |
start = @i | |
diff --git i/Test/parser.tests.coffee w/Test/parser.tests.coffee | |
index bc3864f..dc23c9d 100644 | |
--- i/Test/parser.tests.coffee | |
+++ w/Test/parser.tests.coffee | |
@@ -38,7 +38,7 @@ describe 'Parser', -> | |
it 'should parse Execution', -> | |
expr = parser.parse('{hello world}').next | |
- expect(expr.contents).to.be.a(Paws.Execution) | |
+ expect(expr.contents).to.be.a(Paws.Native) | |
it 'should keep track of locations', -> | |
expr = parser.parse('hello world') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment