Skip to content

Commit be94293

Browse files
committed
glayzzle#68 fix location on method bodies
1 parent 622724d commit be94293

File tree

4 files changed

+9
-3
lines changed

4 files changed

+9
-3
lines changed

dist/php-parser.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! php-parser - BSD3 License - 2017-02-26 */
1+
/*! php-parser - BSD3 License - 2017-03-04 */
22

33
require=(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
44
// shim for using process in browser
@@ -6100,6 +6100,9 @@ module.exports = {
61006100
} else {
61016101
if (this.expect('{')) {
61026102
result.body = this.read_code_block(false);
6103+
if (result.loc && result.body.loc) {
6104+
result.loc.end = result.body.loc.end;
6105+
}
61036106
}
61046107
if (flag) {
61056108
result.parseFlags(flag);

dist/php-parser.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/php-parser.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/parser/function.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ module.exports = {
4444
} else {
4545
if (this.expect('{')) {
4646
result.body = this.read_code_block(false);
47+
if (result.loc && result.body.loc) {
48+
result.loc.end = result.body.loc.end;
49+
}
4750
}
4851
if (flag) {
4952
result.parseFlags(flag);

0 commit comments

Comments
 (0)