Merge branch 'pr-1791'
This commit is contained in:
@ -63,6 +63,7 @@ Being based on a proper Antlr grammar, CPD can:
|
||||
* [#1776](https://github.com/pmd/pmd/pull/1776): \[java] Show more detailed message when can't resolve field type - [Andrey Fomin](https://github.com/andrey-fomin)
|
||||
* [#1781](https://github.com/pmd/pmd/pull/1781): \[java] Location change in AssignmentToNonFinalStatic - [Maikel Steneker](https://github.com/maikelsteneker)
|
||||
* [#1789](https://github.com/pmd/pmd/pull/1789): \[cpd] \[core] Use current classloader instead of Thread's classloader - [Andreas Schmid](https://github.com/aaschmid)
|
||||
* [#1791](https://github.com/pmd/pmd/pull/1791): \[dart] \[cpd] Dart escaped string - [Maikel Steneker](https://github.com/maikelsteneker)
|
||||
|
||||
{% endtocmaker %}
|
||||
|
||||
|
@ -344,8 +344,8 @@ booleanLiteral
|
||||
stringLiteral: SingleLineString;
|
||||
//stringLiteral: SingleLineString;
|
||||
SingleLineString
|
||||
: '"' ~["]* '"'
|
||||
| '\'' ~[']* '\''
|
||||
: '"' (~["] | '\\"')* '"'
|
||||
| '\'' (~['] | '\\\'')* '\''
|
||||
// | 'r\'' (~('\'' | NEWLINE))* '\'' // TODO
|
||||
// | 'r"' (~('\'' | NEWLINE))* '"'
|
||||
;
|
||||
|
@ -31,6 +31,7 @@ public class DartTokenizerTest extends AbstractTokenizerTest {
|
||||
public static Collection<Object[]> data() {
|
||||
return Arrays.asList(
|
||||
new Object[] { "comment.dart", 5 },
|
||||
new Object[] { "escaped_string.dart", 17 },
|
||||
new Object[] { "increment.dart", 185 },
|
||||
new Object[] { "imports.dart", 1 }
|
||||
);
|
||||
|
@ -0,0 +1,4 @@
|
||||
var a = "a";
|
||||
var b = "b";
|
||||
var c = "c";
|
||||
var x = "$a(b: $b, c: \"$c\")";
|
Reference in New Issue
Block a user