nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rename `NativeString` to `CString`
[nit.git]
/
contrib
/
pep8analysis
/
src
/
pep8analysis_web.nit
diff --git
a/contrib/pep8analysis/src/pep8analysis_web.nit
b/contrib/pep8analysis/src/pep8analysis_web.nit
index
b991952
..
e9a81d8
100644
(file)
--- a/
contrib/pep8analysis/src/pep8analysis_web.nit
+++ b/
contrib/pep8analysis/src/pep8analysis_web.nit
@@
-31,7
+31,7
@@
import ast
import model
import cfg
import flow_analysis
import model
import cfg
import flow_analysis
-intrude import standard::stream
+intrude import core::stream
import cpp
in "C++" `{
import cpp
in "C++" `{
@@
-40,7
+40,7
@@
in "C++" `{
using namespace emscripten;
EMSCRIPTEN_BINDINGS(my_module) {
using namespace emscripten;
EMSCRIPTEN_BINDINGS(my_module) {
- function("run_analysis", &NativeString_run_analysis, allow_raw_pointers());
+ function("run_analysis", &CString_run_analysis, allow_raw_pointers());
}
`}
}
`}
@@
-50,7
+50,7
@@
redef class AnalysisManager
do
sys.suggest_garbage_collection
do
sys.suggest_garbage_collection
- var stream = new StringIStream(src)
+ var stream = new StringReader(src)
var ast = build_ast("web", stream)
if ast == null then return
var ast = build_ast("web", stream)
if ast == null then return
@@
-95,7
+95,7
@@
redef class AnalysisManager
print_notes
if notes.is_empty then print "Success: Nothing wrong detected"
print_notes
if notes.is_empty then print "Success: Nothing wrong detected"
- var of = new StringOStream
+ var of = new StringWriter
cfg.print_dot(of, false)
of.close
show_graph(of.to_s)
cfg.print_dot(of, false)
of.close
show_graph(of.to_s)
@@
-108,11
+108,11
@@
redef class AnalysisManager
fun show_graph(content: String) do "show_graph('{content.escape_to_c}');".run_js
end
fun show_graph(content: String) do "show_graph('{content.escape_to_c}');".run_js
end
-redef class NativeString
+redef class CString
fun run_analysis do manager.run_web to_s
end
fun run_analysis do manager.run_web to_s
end
-fun dummy_set_callbacks import NativeString.run_analysis in "C++" `{
+fun dummy_set_callbacks import CString.run_analysis in "C++" `{
`}
dummy_set_callbacks
`}
dummy_set_callbacks