From a4c428f4ffe16a7ff84012a778f0e902d2dba487 Mon Sep 17 00:00:00 2001 From: Ben Kurtovic Date: Mon, 9 Jun 2014 14:36:41 -0400 Subject: [PATCH] Java parser: use 'functions' instead of 'methods'. --- bitshift/query/__init__.py | 3 ++- .../java/src/main/java/com/bitshift/parsing/symbols/JavaSymbols.java | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/bitshift/query/__init__.py b/bitshift/query/__init__.py index 84ba844..0c02b1b 100644 --- a/bitshift/query/__init__.py +++ b/bitshift/query/__init__.py @@ -31,7 +31,8 @@ class _QueryParser(object): self._parse_modified: ["m", "mod", "modified", "modify"], self._parse_created: ["cr", "create", "created"], self._parse_symbol: ["s", "sym", "symb", "symbol"], - self._parse_function: ["f", "fn", "fun", "func", "function"], + self._parse_function: ["f", "fn", "fun", "func", "function", + "meth", "method"], self._parse_class: ["cl", "class", "clss"], self._parse_variable: ["v", "var", "variable"], self._parse_namespace: ["n", "ns", "namespace", "module"], diff --git a/parsers/java/src/main/java/com/bitshift/parsing/symbols/JavaSymbols.java b/parsers/java/src/main/java/com/bitshift/parsing/symbols/JavaSymbols.java index 6f0caf1..9c36d6b 100644 --- a/parsers/java/src/main/java/com/bitshift/parsing/symbols/JavaSymbols.java +++ b/parsers/java/src/main/java/com/bitshift/parsing/symbols/JavaSymbols.java @@ -141,7 +141,7 @@ public class JavaSymbols extends Symbols { StringBuilder builder = new StringBuilder(); builder.append("\"classes\":" + this._classes + ","); builder.append("\"interfaces\":" + this._interfaces + ","); - builder.append("\"methods\":" + this._methods + ","); + builder.append("\"functions\":" + this._methods + ","); builder.append("\"vars\":" + this._vars + ","); String s = builder.toString().replaceAll("=", ":");