From 76319c4efaf86e24feac373b0e1a305fc138a5e7 Mon Sep 17 00:00:00 2001 From: Jens Fischer Date: Sat, 18 Jul 2020 11:40:20 +0200 Subject: [PATCH] Update tokentree --- haxe_libraries/tokentree.hxml | 6 +++--- src/features/vis/tokenTreeVis/TokenTreeContentProvider.hx | 2 +- src/features/vis/tokenTreeVis/TokenTreeVis.hx | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/haxe_libraries/tokentree.hxml b/haxe_libraries/tokentree.hxml index 88b49c6..ac52b3f 100644 --- a/haxe_libraries/tokentree.hxml +++ b/haxe_libraries/tokentree.hxml @@ -1,3 +1,3 @@ --D tokentree=1.0.24 -# @install: lix --silent download "haxelib:/tokentree#1.0.24" into tokentree/1.0.24/haxelib --cp ${HAXE_LIBCACHE}/tokentree/1.0.24/haxelib/src +-D tokentree=1.0.28 +# @install: lix --silent download "gh://github.com/HaxeCheckstyle/tokentree#0b48308e5cec2daf8e721dc69835be1360272d8a" into tokentree/1.0.28/github/0b48308e5cec2daf8e721dc69835be1360272d8a +-cp ${HAXE_LIBCACHE}/tokentree/1.0.28/github/0b48308e5cec2daf8e721dc69835be1360272d8a/src diff --git a/src/features/vis/tokenTreeVis/TokenTreeContentProvider.hx b/src/features/vis/tokenTreeVis/TokenTreeContentProvider.hx index 9fca4a6..8ace1a1 100644 --- a/src/features/vis/tokenTreeVis/TokenTreeContentProvider.hx +++ b/src/features/vis/tokenTreeVis/TokenTreeContentProvider.hx @@ -32,7 +32,7 @@ class TokenTreeContentProvider extends ContentProviderBase { tokens.push(t); t = lexer.token(haxeparser.HaxeLexer.tok); } - TokenStream.MODE = RELAXED; + TokenStream.MODE = Relaxed; content = TokenTreeBuilder.buildTokenTree(tokens, bytes); resolve(rerender()); } catch (e:Any) { diff --git a/src/features/vis/tokenTreeVis/TokenTreeVis.hx b/src/features/vis/tokenTreeVis/TokenTreeVis.hx index 5db6af2..a0502c9 100644 --- a/src/features/vis/tokenTreeVis/TokenTreeVis.hx +++ b/src/features/vis/tokenTreeVis/TokenTreeVis.hx @@ -58,7 +58,7 @@ class TokenTreeVis extends TreePrinterBase { case Const(CIdent(s)): if (~/^[A-Z]/.match(s)) { "type"; - } else if (t.access().firstOf(POpen).exists()) { + } else if (t.access().firstOf(t -> t.match(POpen)).exists()) { "function"; } else { "ident";