From 1b0b8c6cedae5ed4fb09d0c4d2f5c095974bed0a Mon Sep 17 00:00:00 2001 From: rickhg12hs Date: Thu, 30 Aug 2018 00:12:47 +0200 Subject: [PATCH] Update get_token in handlers.jl to tokenize macros Change tokenizer logic so that char "@" can become part of the token. Allows inspect_request to get info for macros. --- src/handlers.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/handlers.jl b/src/handlers.jl index d1e2ddd3..8f90c37b 100644 --- a/src/handlers.jl +++ b/src/handlers.jl @@ -234,11 +234,11 @@ function get_token(code, pos) end end endpos = startpos - while startpos >= firstindex(code) && (is_id_char(code[startpos]) || code[startpos] == '.') + while startpos >= firstindex(code) && (is_id_char(code[startpos]) || code[startpos] == '.' || code[startpos] == '@') startpos = prevind(code, startpos) end startpos = startpos < pos ? nextind(code, startpos) : pos - if !is_id_start_char(code[startpos]) + if (!is_id_start_char(code[startpos]) && code[startpos] != '@') return "" end while endpos < lastindex(code) && is_id_char(code[endpos])