gofront 0.0.8 → 0.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -20,10 +20,14 @@ export const statementParserMethods = {
20
20
  const t = this.peek();
21
21
  const stmt = this._parseStmt(t);
22
22
  if (Array.isArray(stmt)) {
23
- for (const s of stmt) s._line = t.line;
23
+ for (const s of stmt) {
24
+ s._line = t.line;
25
+ s._col = t.col;
26
+ }
24
27
  return stmt;
25
28
  }
26
29
  stmt._line = t.line;
30
+ stmt._col = t.col;
27
31
  return stmt;
28
32
  },
29
33
 
package/src/parser.js CHANGED
@@ -107,7 +107,14 @@ export class Parser {
107
107
  if (Array.isArray(result)) decls.push(...result);
108
108
  else decls.push(result);
109
109
  }
110
- return { kind: "Program", pkg, imports, decls, _filename: this.filename };
110
+ return {
111
+ kind: "Program",
112
+ pkg,
113
+ imports,
114
+ decls,
115
+ _filename: this.filename,
116
+ _source: this.source,
117
+ };
111
118
  }
112
119
 
113
120
  parsePackage() {