Skip to content

Commit

Permalink
WIP: add some console logs
Browse files Browse the repository at this point in the history
  • Loading branch information
fdodino committed Nov 11, 2024
1 parent 5118fef commit 006cbd3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"test:game": "mocha --parallel -r ts-node/register/transpile-only test/**/game.test.ts",
"test:dynamicDiagram": "mocha --parallel -r ts-node/register/transpile-only test/dynamicDiagram.test.ts",
"test:helpers": "mocha --parallel -r ts-node/register/transpile-only test/helpers.test.ts",
"test:interpreter": "mocha --parallel -r ts-node/register/transpile-only test/interpreter.test.ts",
"test:interpreter": "mocha -r ts-node/register/transpile-only test/interpreter.test.ts",
"test:linker": "mocha --parallel -r ts-node/register/transpile-only test/linker.test.ts",
"test:messageReporter": "mocha --parallel -r ts-node/register/transpile-only test/messageReporter.test.ts",
"test:model": "mocha --parallel -r ts-node/register/transpile-only test/model.test.ts",
Expand Down
4 changes: 4 additions & 0 deletions src/linker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@ export const assignScopes = (root: Node): void => {
: parent?.scope
assign(node, { scope: new LocalScope(containerScope) })

if (node.name === 'Medico') {

Check failure on line 96 in src/linker.ts

View workflow job for this annotation

GitHub Actions / build

Property 'name' does not exist on type 'Node'.

Check failure on line 96 in src/linker.ts

View workflow job for this annotation

GitHub Actions / build

Property 'name' does not exist on type 'Node'.
console.info(canBeReferenced(node), node.name, node.scope)

Check failure on line 97 in src/linker.ts

View workflow job for this annotation

GitHub Actions / build

Property 'name' does not exist on type 'Node'.

Check failure on line 97 in src/linker.ts

View workflow job for this annotation

GitHub Actions / build

Property 'name' does not exist on type 'Node'.
}

parent?.scope?.register(...scopeContribution(node))
})

Expand Down
4 changes: 2 additions & 2 deletions test/interpreter.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ describe('Wollok Interpreter', () => {
checkSuccessfulResult('{1 + 2}', '{1 + 2}')
})

it('should be able to execute sentences related to a hierarchy defined in different packages', () => {
it.only('should be able to execute sentences related to a hierarchy defined in different packages', () => {
const replEnvironment = buildEnvironment([{
name: 'jefeDeDepartamento.wlk', content: `
import medico.*
Expand Down Expand Up @@ -328,7 +328,7 @@ describe('Wollok Interpreter', () => {
}])
interpreter = new Interpreter(Evaluation.build(replEnvironment, WRENatives))
const { error } = interprete(interpreter, 'testit.test()')
console.info(error)
// console.info(error)
expect(error).to.be.undefined
})

Expand Down

0 comments on commit 006cbd3

Please sign in to comment.