Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
anpl
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ziyuan Nan
anpl
Commits
2e1673e0
Commit
2e1673e0
authored
May 11, 2023
by
nzy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hello
parent
e2d476ab
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
anpl/parser.py
+1
-1
utils.py
+1
-1
No files found.
anpl/parser.py
View file @
2e1673e0
...
...
@@ -27,7 +27,7 @@ class FunctionDef(ast.NodeVisitor):
def
visit_FunctionDef
(
self
,
node
):
if
self
.
is_hole
(
node
):
self
.
un
defined_funs
[
node
.
name
]
=
Function
(
node
.
name
,
ast
.
get_docstring
(
node
),
code_from_user
=
False
,
prompt_from_user
=
self
.
from_user
)
self
.
defined_funs
[
node
.
name
]
=
Function
(
node
.
name
,
ast
.
get_docstring
(
node
),
code_from_user
=
False
,
prompt_from_user
=
self
.
from_user
)
else
:
self
.
current_caller
=
Function
(
node
.
name
,
ast
.
get_docstring
(
node
),
node
,
code_from_user
=
self
.
from_user
,
prompt_from_user
=
self
.
from_user
)
self
.
defined_funs
[
node
.
name
]
=
self
.
current_caller
...
...
utils.py
View file @
2e1673e0
...
...
@@ -70,7 +70,7 @@ sys_str = "[bold red]SYSTEM: [/bold red]"
def
system_info
(
text
):
print
(
sys_str
+
text
)
def
print_anpl
(
anpl
,
for_user
=
Tru
e
):
def
print_anpl
(
anpl
,
for_user
=
Fals
e
):
print
(
Syntax
(
anpl
.
to_python
(
for_user
=
for_user
),
"python"
))
def
print_text_IOExamples
(
ios
:
list
[
IOExample
]):
...
...
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