Skip to content

Commit

Permalink
Made all paths in imports relative. Thus steps shouldn't use modules …
Browse files Browse the repository at this point in the history
…from other steps.
  • Loading branch information
maestrow committed May 17, 2021
1 parent cd3719d commit 4fc472c
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/step2/grammars/ometa1.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { IProjectors } from 'step2/types'
import { IProjectors } from '../types'
import { Ast as AST } from '../grammar-ast'

export const ometa1: AST.Grammar = [
Expand Down
6 changes: 3 additions & 3 deletions src/step2/utils/trace-discover.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Ast } from "step2/grammar-ast";
import { TraceItem } from "step2/tracer";
import { Compiler, Templates, TemplatesTrace } from "step2/ast2ometa";
import { Ast } from "../grammar-ast";
import { TraceItem } from "../tracer";
import { Compiler, Templates, TemplatesTrace } from "../ast2ometa";

export class TraceDiscovery {

Expand Down
2 changes: 1 addition & 1 deletion src/step3/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { ometa1, proj } from './grammars/ometa1'
import { TraceDiscovery } from "./utils/trace-discover";


const input = fs.readFileSync('src/step2/grammars/ometa1.ometa', 'utf-8')
const input = fs.readFileSync('src/step3/grammars/ometa1.ometa', 'utf-8')

//const p = new Parser(math1, [...'((1+2)-3*3)/4'])
//const r = p.match('expr')
Expand Down
2 changes: 1 addition & 1 deletion src/step3/grammars/ometa1.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { IProjectors } from 'step2/types'
import { IProjectors } from '../types'
import { Ast as AST } from '../grammar-ast'

export const ometa1: AST.Grammar = [
Expand Down
2 changes: 1 addition & 1 deletion src/step3/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { ometa1, proj } from './grammars/ometa1'
import * as fs from "fs";

test('the data is peanut butter', () => {
const input = fs.readFileSync('src/step2/grammars/ometa1.ometa', 'utf-8')
const input = fs.readFileSync('src/step3/grammars/ometa1.ometa', 'utf-8')
const p = new Parser(ometa1, input as unknown as any[], proj)
const r = p.match('ometa')
//const p = new Parser()
Expand Down
6 changes: 3 additions & 3 deletions src/step3/utils/trace-discover.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Ast } from "step2/grammar-ast";
import { TraceItem } from "step2/tracer";
import { Compiler, Templates, TemplatesTrace } from "step2/ast2ometa";
import { Ast } from "../grammar-ast";
import { TraceItem } from "../tracer";
import { Compiler, Templates, TemplatesTrace } from "../ast2ometa";

export class TraceDiscovery {

Expand Down

0 comments on commit 4fc472c

Please sign in to comment.