349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
|
# File 'lib/ntail/formatting.rb', line 349
def _nt_http_referer
start_index = index
if node_cache[:http_referer].has_key?(index)
cached = node_cache[:http_referer][index]
if cached
cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
@index = cached.interval.end
end
return cached
end
if has_terminal?('%R', false, index)
r0 = instantiate_node(Node,input, index...(index + 2))
r0.extend(HttpReferer0)
@index += 2
else
terminal_parse_failure('%R')
r0 = nil
end
node_cache[:http_referer][start_index] = r0
r0
end
|