From d14de3d7b5955d353ba3108b91ad4eadc6697908 Mon Sep 17 00:00:00 2001 From: liu fengyun Date: Thu, 8 Dec 2016 21:15:34 +0100 Subject: fix #1779: support $_ and $_id in interpolated string --- compiler/src/dotty/tools/dotc/parsing/Parsers.scala | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'compiler/src/dotty/tools/dotc/parsing/Parsers.scala') diff --git a/compiler/src/dotty/tools/dotc/parsing/Parsers.scala b/compiler/src/dotty/tools/dotc/parsing/Parsers.scala index 51dafc928..1f5ad397d 100644 --- a/compiler/src/dotty/tools/dotc/parsing/Parsers.scala +++ b/compiler/src/dotty/tools/dotc/parsing/Parsers.scala @@ -625,6 +625,10 @@ object Parsers { atPos(in.offset) { if (in.token == IDENTIFIER) termIdent() + else if (in.token == USCORE) { + in.nextToken() + Ident(nme.WILDCARD) + } else if (in.token == THIS) { in.nextToken() This(EmptyTypeIdent) -- cgit v1.2.3