Skip to content

Commit fa32858

Browse files
committed
py/js: remove unused viml_type
1 parent edd6a79 commit fa32858

File tree

4 files changed

+0
-64
lines changed

4 files changed

+0
-64
lines changed

js/vimlfunc.js

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -219,20 +219,3 @@ function viml_stridx(a, b) {
219219
return a.indexOf(b);
220220
}
221221

222-
function viml_type(obj) {
223-
if (typeof obj == 'number' && Math.round(obj) == obj) {
224-
return 0;
225-
} else if (typeof obj == 'string') {
226-
return 1;
227-
} else if (typeof obj == 'function') {
228-
return 2;
229-
} else if (obj instanceof Array) {
230-
return 3;
231-
} else if (obj instanceof Object) {
232-
return 4;
233-
} else if (typeof obj == 'number') {
234-
return 5;
235-
}
236-
throw 'Unknown Type';
237-
}
238-

js/vimlparser.js

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -219,23 +219,6 @@ function viml_stridx(a, b) {
219219
return a.indexOf(b);
220220
}
221221

222-
function viml_type(obj) {
223-
if (typeof obj == 'number' && Math.round(obj) == obj) {
224-
return 0;
225-
} else if (typeof obj == 'string') {
226-
return 1;
227-
} else if (typeof obj == 'function') {
228-
return 2;
229-
} else if (obj instanceof Array) {
230-
return 3;
231-
} else if (obj instanceof Object) {
232-
return 4;
233-
} else if (typeof obj == 'number') {
234-
return 5;
235-
}
236-
throw 'Unknown Type';
237-
}
238-
239222
var NIL = [];
240223
var TRUE = 1;
241224
var FALSE = 0;

py/vimlfunc.py

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -175,18 +175,3 @@ def viml_has_key(obj, key):
175175
def viml_stridx(a, b):
176176
return a.find(b)
177177

178-
def viml_type(obj):
179-
if isinstance(obj, int):
180-
return 0
181-
elif isinstance(obj, str):
182-
return 1
183-
elif inspect.isfunction(obj):
184-
return 2
185-
elif isinstance(obj, list):
186-
return 3
187-
elif isinstance(obj, dict):
188-
return 4
189-
elif isinstance(obj, float):
190-
return 5
191-
raise VimLParserException('Unknown Type')
192-

py/vimlparser.py

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -175,21 +175,6 @@ def viml_has_key(obj, key):
175175
def viml_stridx(a, b):
176176
return a.find(b)
177177

178-
def viml_type(obj):
179-
if isinstance(obj, int):
180-
return 0
181-
elif isinstance(obj, str):
182-
return 1
183-
elif inspect.isfunction(obj):
184-
return 2
185-
elif isinstance(obj, list):
186-
return 3
187-
elif isinstance(obj, dict):
188-
return 4
189-
elif isinstance(obj, float):
190-
return 5
191-
raise VimLParserException('Unknown Type')
192-
193178
NIL = []
194179
TRUE = 1
195180
FALSE = 0

0 commit comments

Comments
 (0)