Marijn Haverbeke
2ace0fa8dc
Further refine parseExprList indentation heuristic
...
Closes marijnh/tern#221
2013-08-27 12:52:02 +02:00
Marijn Haverbeke
6113324cd2
Fix bug with parsing slash after operator-keyword property
...
Closes #53
2013-08-25 15:01:20 +02:00
Jürg Lehni
097b4162da
Pass on 'this' as root scope, for better inclusion of Acorn inside Paper.js
...
Use same approach as Esprima.
2013-07-26 08:59:07 +02:00
Jiaxing Wang
a84e21e0ff
Line number start from 1 after getToken.jumpTo()
2013-07-11 12:28:58 +02:00
Jiaxing Wang
16b54e0698
parseMaybeUnary() doesn't need parameter @noIn
2013-07-11 08:20:05 +02:00
Jiaxing Wang
567f3ca32a
Remove redundant if conditions that are tested above
2013-07-11 08:20:04 +02:00
Marijn Haverbeke
328d0e514c
Linting
2013-07-08 09:07:10 +02:00
Marijn Haverbeke
d3b9eb177a
Always attach a guardedHandlers property to TryStatements
...
Closes #48
2013-07-08 09:03:23 +02:00
Marijn Haverbeke
67c48229b9
Bump version number post-0.3.1
2013-06-11 12:44:35 +02:00
Marijn Haverbeke
d2673d465a
Release 0.3.1 to fix release-making-script screwup in 0.3.0
2013-06-11 12:43:56 +02:00
Marijn Haverbeke
7e248c7e3b
Mark release 0.3.0
2013-06-11 12:41:03 +02:00
Marijn Haverbeke
2372b12df7
[loose parser] Refine closing heuristic for expression lists
...
Issue marijnh/tern#171
2013-06-10 18:02:17 +02:00
Marijn Haverbeke
3ca3aa5a25
Run a lint pass, clean up lots of small issues
2013-06-10 16:52:22 +02:00
Marijn Haverbeke
6fe123947b
Prefix keywords with underscore in tokTypes object
2013-06-10 15:47:29 +02:00
Marijn Haverbeke
314327537a
Add charset to script link that includes test suite
...
So that browsers don't get confused by the utf-8 sequences.
2013-06-08 20:36:50 +02:00
Marijn Haverbeke
adf16e33c0
Don't assume options object has a hasOwnProperty method
...
Closes #43
2013-06-08 20:36:44 +02:00
Marijn Haverbeke
c979446572
[package.json] Use 'repository' rather than 'repositories' field
...
Apparently the second is no longer supported in npm 1.2 (?).
Closes #42
2013-05-21 14:36:49 +02:00
Marijn Haverbeke
38f0e80547
Include diacritical combining marks in identifier character set
...
Closes marijn/tern#157
2013-05-21 09:07:50 +02:00
Marijn Haverbeke
6dd35f870a
[loose parser] Fix bug in continued-expression closing
...
When the continued expression sat on column 1 after a non-whitespace char,
the heuristic would consider it the start of the line, even though it wasn't.
Issue marijnh/tern#141
2013-05-15 12:03:00 +02:00
Marijn Haverbeke
9eee5300db
[loose parser] Less aggressive termination heuristic for comma-separated lists
...
See https://github.com/marijnh/tern/issues/118
2013-05-08 15:21:25 +02:00
Marijn Haverbeke
4d8eeabf52
In browser loader, refer to global object as 'this', not 'self'
...
Closes #41
2013-05-08 15:16:06 +02:00
Marijn Haverbeke
df763df61b
Bump version number post-0.2
2013-05-03 11:54:04 +02:00
Marijn Haverbeke
4146605738
Mark version 0.2.0
2013-05-03 11:52:42 +02:00
Marijn Haverbeke
30b399ece7
Export isIdentifierChar and isIdentifierStart
2013-04-24 07:44:11 +02:00
Marijn Haverbeke
f3c70d76ef
Remove assignment to non-existing var
2013-04-03 15:05:00 +02:00
Marijn Haverbeke
cc12062b9c
[loose parser] Fix a whole bunch of issues in the options.locations support
...
Closes #40
2013-04-02 13:47:50 +02:00
Marijn Haverbeke
62bc3641af
Use a single .handler property on TryStatements
...
As the wiki page for the spec currently seems to prescribe.
2013-04-02 09:30:35 +02:00
Paul Harper
a6b3034e71
[loose parser] More fixes to locations
2013-03-27 10:57:48 +01:00
Marijn Haverbeke
54e78b7035
Properly back up line state when re-reading a token on strict mode
...
Issue #38
2013-03-25 15:10:55 +01:00
Oskar Schöldström
a8a24f538b
Fix \v being treated as v in IE < 9
...
IE < 9 treats '\v' as 'v' instead of a vertical tab ('\u000b').
Read more: http://mathiasbynens.be/notes/javascript-escapes
2013-03-23 19:18:28 +01:00
Marijn Haverbeke
76be1f8eee
Make Acorn work with AMD modules
...
(Hopefully)
2013-03-17 22:56:49 +01:00
Paul Harper
559518acc8
.parse_dammit() now recognizes the locations option, and will add a loc object to the ast nodes as .parse() does
2013-03-17 22:07:14 +01:00
Marijn Haverbeke
38179fd855
Fix node boundaries for unexpected regular expressions
...
Closes #33
2013-02-28 19:28:20 +01:00
Marijn Haverbeke
0b10aa2256
Add walk.findNodeBefore
2013-02-28 19:27:29 +01:00
Marijn Haverbeke
83cdcf7dbf
Remove outdated option from bin/acorn
2013-02-27 09:59:42 +01:00
zsjforcn
173d94f019
[package] Add "bin" property to package.json for npm to auto generate exection files.
2013-02-27 09:39:09 +01:00
Marijn Haverbeke
9a55d60324
Move back to regular string accumulation in readString
...
The apply call is a stack overflow hazard.
Closes #31
2013-02-24 21:26:09 +01:00
Marijn Haverbeke
b1845b51b1
[util/walk] Add findNodeAfter
2013-02-24 21:25:25 +01:00
Marijn Haverbeke
72d2fc2644
Fix start offset of block nodes
2013-02-20 10:48:36 +01:00
Marijn Haverbeke
782259bea1
[loose parser] Fix bug where peeked tokens persist across parses
2013-02-14 14:05:54 +01:00
Marijn Haverbeke
adcb354498
[walker] Fix broken handling of node predicates
2013-02-14 14:02:48 +01:00
Marijn Haverbeke
006d5f1c04
Bump version post-0.1
2013-02-14 10:02:27 +01:00
Marijn Haverbeke
c108741d07
Mark release 0.1
2013-02-14 10:00:19 +01:00
Marijn Haverbeke
da83f80d29
Allow passing a test predicate to findNodeAt and findNodeAround
2013-02-12 17:35:04 +01:00
Marijn Haverbeke
76c41d3a71
[loose parser] Improve closing heuristic in parseExprList
2013-02-06 13:47:05 +01:00
Marijn Haverbeke
82980794a9
Fix bug in expression-terminating heuristic
...
Dedented tokens should only end an expression if they are actually the first
token on the line.
This to prevent code like this from going wrong:
x = (function(..) {
blah();
})(); // <-- indented same as start of expression
2013-02-05 13:49:51 +01:00
Marijn Haverbeke
d98e378590
Store default walker in exports.base, rather than exports itself
...
My initial idea, that client code would constantly need to access the individual
walker functions directly, isn't actually the case. This prevents unnecessary copying
of other interface functions into walkers.
2013-01-30 19:11:27 +01:00
Alistair Braidwood
0632b36c94
Improve options.locations performance by tracking newlines rather than finding them
2013-01-30 17:30:38 +01:00
Marijn Haverbeke
87a6a5a8cd
Clean up readNumber, fix parsing of '2.+2'
...
Issue #9
2013-01-30 16:38:31 +01:00
Marijn Haverbeke
792fa96e93
Add walk.findNodeAround
2013-01-28 17:17:51 +01:00