yinwang0 / rubysonar Goto Github PK
View Code? Open in Web Editor NEWA semantic indexer for Ruby with interprocedual type inference
A semantic indexer for Ruby with interprocedual type inference
localhost:rubysonar apple$ mvn package
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building rubysonar 0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @ rubysonar ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 5 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ rubysonar ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 73 source files to /Users/apple/projects/rubysonar/target/classes
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.971s
[INFO] Finished at: Wed Feb 19 02:19:51 CST 2014
[INFO] Final Memory: 5M/81M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project rubysonar: Fatal error compiling: ??Ч??Ŀ??汾?? 1.7 -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
能在你的博客上谈下对elixir语言的看法么,谢谢
"""
License (GNU AGPLv3)
RubySonar - a type inferencer and indexer for Python
Copyright (c) 2013-2014 Yin Wang
"""
It should be "Ruby"
The JSONDump help message says:
$ java -cp target/rubysonar-0.1-SNAPSHOT.jar org.yinwang.rubysonar.JSONDump
Usage: java org.yinwang.rubysonar.dump <source-path> <include-paths> <out-root> [verbose]
<source-path> is path to source unit (package directory or module file) that will be graphed
<include-paths> are colon-separated paths to included libs
<out-root> is the prefix of the output files. There are 3 output files: <out-root>-doc, <out-root>-sym, <out-root>-ref
[verbose] if set, then verbose logging is used (optional)
but the code for parsing args expects them in a different order:
if (args.length >= 3) {
projectDir = args[0];
outroot = args[1];
inclpaths = Arrays.asList(args[2].split(":"));
srcpath.addAll(Arrays.asList(args).subList(3, args.length));
} else {
usage();
return;
}
Because you make "typeStack" a static field in Type, I propose a check to fail at mis-operations and (future?) concurrency problem (ah, my own analyzer program is multi-threaded). And so that the method parameters can be taken use of.
We can write TypeStack#pop(...) as below:
public void pop(Object first, Object second) {
Pair removed = stack.remove(stack.size() - 1);
if (removed.first != first || removed.second != second) {
throw new IllegalStateException("TypeStack is not in its expected state!");
}
}
For code as follow
class A
@f = 0
def self.f
@f
end
end
a = A.new
a.f
it will create a definition for the instance variable f (qname: A::f), and one for the class method (qname: A.f)
however, the reference generated is strange:
f in line 4 referenced to A.f
a.f in last line referenced to A::f
it looks like we want the contrary result
it looks like the reason is: f in line 4 is a Name node, which should really be a attribute node.
and a.f in last line is attribute node, which should be a method call I believe.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.