Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
typon-compiler
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
typon
typon-compiler
Commits
1be7d50a
Commit
1be7d50a
authored
Aug 11, 2023
by
Tom Niget
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Skip internal functions
parent
8b02cffd
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
0 deletions
+3
-0
trans/transpiler/phases/typing/block.py
trans/transpiler/phases/typing/block.py
+1
-0
trans/transpiler/phases/typing/expr.py
trans/transpiler/phases/typing/expr.py
+2
-0
No files found.
trans/transpiler/phases/typing/block.py
View file @
1be7d50a
...
@@ -257,6 +257,7 @@ class ScoperBlockVisitor(ScoperVisitor):
...
@@ -257,6 +257,7 @@ class ScoperBlockVisitor(ScoperVisitor):
def
visit
(
self
,
node
:
ast
.
AST
):
def
visit
(
self
,
node
:
ast
.
AST
):
if
isinstance
(
node
,
ast
.
AST
):
if
isinstance
(
node
,
ast
.
AST
):
TB_SKIP
=
True
super
().
visit
(
node
)
super
().
visit
(
node
)
node
.
scope
=
self
.
scope
node
.
scope
=
self
.
scope
else
:
else
:
...
...
trans/transpiler/phases/typing/expr.py
View file @
1be7d50a
...
@@ -36,8 +36,10 @@ class ScoperExprVisitor(ScoperVisitor):
...
@@ -36,8 +36,10 @@ class ScoperExprVisitor(ScoperVisitor):
def
visit
(
self
,
node
)
->
BaseType
:
def
visit
(
self
,
node
)
->
BaseType
:
if
existing
:
=
getattr
(
node
,
"type"
,
None
):
if
existing
:
=
getattr
(
node
,
"type"
,
None
):
return
existing
.
resolve
()
return
existing
.
resolve
()
TB_SKIP
=
True
res
=
super
().
visit
(
node
)
res
=
super
().
visit
(
node
)
if
not
res
:
if
not
res
:
TB_SKIP
=
False
raise
NotImplementedError
(
f"`
{
ast
.
unparse
(
node
)
}
`
{
type
(
node
)
}
"
)
raise
NotImplementedError
(
f"`
{
ast
.
unparse
(
node
)
}
`
{
type
(
node
)
}
"
)
res
=
res
.
resolve
()
res
=
res
.
resolve
()
node
.
type
=
res
node
.
type
=
res
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment