300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
|
# File 'app/openbel/api/routes/expressions.rb', line 300
def call(ast_node)
if !ast_node.is_a?(BelAstNodeToken) || ast_node.token_type != :BEL_TOKEN_TERM
return false
end
if !SEQUENCE_VARIATION_FX.include?(ast_node.left.to_typed_node.value)
return false
end
arg_node = ast_node.right.to_typed_node
while !(arg_node.left.pointer.null? && arg_node.right.pointer.null?)
arg_token = arg_node.left.to_typed_node
if arg_token.token_type == :BEL_TOKEN_NV
node_value = arg_token.right.to_typed_node.value
if integer?(node_value)
return true
end
end
arg_node = arg_node.right.to_typed_node
end
return false
end
|