37 Commits

Author SHA1 Message Date
Andreas Dangel
c0dff0d75a Merge branch 'master' into pmd/7.0.x 2022-09-30 12:17:45 +02:00
Andreas Dangel
4d630031c4 Add missing test files 2022-09-24 17:29:00 +02:00
Andreas Dangel
746fcbf086 [lua] Fixups from #4066 2022-09-24 17:18:32 +02:00
Andreas Dangel
dcd8ff0ac0 [lua] Fix parsing of short/long comments 2022-09-24 17:13:29 +02:00
Matt Hargett
f7a5f9cad9 fix incorrect comments 2022-09-13 22:17:43 -07:00
Matt Hargett
936cbafd36 remove unused param 2022-09-13 21:58:02 -07:00
Matt Hargett
7d9a84fdde Format to have more consistent style with itself. Most other files appear to have mixed formatting. 2022-09-09 16:51:33 -07:00
Matt Hargett
b8b4e513ac Support multi-line 'normal' strings. Support skipping literal sequences. More minor adjustments to make the testing corpus tokenize without errors. 2022-09-09 16:42:18 -07:00
Matt Hargett
7747b75091 Cleanups and minor tweaks for issues found in testing across 500KLOC of open source Lua code. 2022-09-08 12:46:43 -07:00
Matt Hargett
7cf9c6571e add an if-expression twist 2022-09-07 19:37:13 -07:00
Matt Hargett
026015954a Move rules from lexer to parser. Fix some bugs found in manual testing. Add bugs found via manual testing to new lua test file. 2022-09-07 19:29:55 -07:00
Matt Hargett
3d6fab0782 rename new snapshot artifact to better express intent 2022-07-26 13:29:19 -07:00
Matt Hargett
cfb8374611 Capture more syntax scenarios in the regression test, update the snapshot. 2022-07-26 13:25:14 -07:00
Matt Hargett
8aaa1302cc Support all Luau type extension syntax available in all test corpus sources. Add a regression test for a few of the things that required tweaks. 2022-07-26 00:13:35 -07:00
Matt Hargett
65fef39a4c Initial Lua type grammar 2022-07-25 21:43:54 -07:00
Andreas Dangel
41eb096dbd Merge branch 'master' into pmd/7.0.x 2022-07-25 20:07:11 +02:00
Matt Hargett
b189d07a15 Fix another superflous ws 2022-07-24 13:41:37 -07:00
Matt Hargett
5dc75e720b Remove superfluous whitespace' 2022-07-24 13:31:24 -07:00
Matt Hargett
8fa558e754 Add explaining comment, cleanup inconsistent fragment formatting 2022-07-24 13:26:37 -07:00
Matt Hargett
54918a7097 Comments have to go to HIDDEN channel so that suppression comments will work. 2022-07-24 13:19:21 -07:00
Matt Hargett
f7f449ca2b Luau benchmarks and conformance suite all analyze fine, update test suite comment. 2022-07-24 13:09:30 -07:00
Matt Hargett
08cc6a1c5c World of Warcraft Lua uses a few non-standard escape patterns, which are easy enough to add and shouldn't introduce any confusions with errors messages on other dialects. 2022-07-24 13:04:14 -07:00
Matt Hargett
50b06f37bc Fortify the Lua parser to fix parse error in several OSS Lua codebases when trying to use CPD. 2022-07-24 12:58:49 -07:00
Clément Fournier
efcfb665ad Cleanups for antlr tokenizers 2020-09-17 22:37:10 +02:00
Andreas Dangel
47ab1f34a4 Delete old antlr4 package-infos 2020-09-13 11:41:26 +02:00
Andreas Dangel
4732164a45 Merge branch 'pmd/7.0.x' into pr-2753 2020-09-13 11:40:23 +02:00
Andreas Dangel
3caa6dd0ba Merge branch 'master' into pmd/7.0.x 2020-09-13 11:39:37 +02:00
Andreas Dangel
7a1e3caba0 Add deprecations for antlr lexers that will be moved with PMD 7
Refs pmd/pmd#2753
2020-09-13 11:28:07 +02:00
Clément Fournier
50d39b39e6 Same for Lua 2020-08-30 19:01:07 +02:00
Andreas Dangel
2b1d071930 Fix tests due to endColumn changes 2020-08-21 12:38:37 +02:00
Andreas Dangel
ab489832fe Merge branch 'master' into pmd/7.0.x 2020-08-21 11:51:54 +02:00
Maikel Steneker
6fb5ac59b9 Ensure CPD uses tab width of 1 for tabs consistently
The columns that are reported by CPD were inconsistent across languages
before. A language like Java (using a JavaCC-based tokenizer) would use
a width of 8 for tabs, whereas a language like C# (using an Antlr-based
tokenizer) would use 1 instead.

This includes unit tests for most languages to ensure a tab character is
counted as 1. The configuration for JavaCC has been adjusted to respect
this as well.
2020-07-20 10:42:21 +02:00
Clément Fournier
5b7ed588ea Make CPD end column exclusive
This is to align it with PMD columns,
which in 7.0 are already exclusive.
2020-06-19 02:21:45 +02:00
Clément Fournier
c49d9e315f Merge branch 'master' into 7.0.x 2020-06-19 01:32:32 +02:00
Clément Fournier
ff2aa9c038 Convert lua tests 2020-06-13 23:01:14 +02:00
Clément Fournier
b51c02f93b Reorganise antlr files
Antlr root nodes need to implement RootNode.

Also, I didn't like the fact that the swift
module didn't use the conventional package
structure (lang.swift.ast) but was rolling
its own convention (lang.swift.antlr4).

I moved base classes for the antlr implementations
into nspmd.lang.ast.impl.antlr4. The fact that a
module is implemented with antlr is an implementation
detail, and it doesn't deserve its own toplevel package
in nspmd.lang.
2019-09-25 03:49:36 +02:00
Maikel Steneker
cd66277c19 Added Lua support to CPD.
The tokenizer uses an ANTLR4 grammar based on the one at https://github.com/antlr/grammars-v4/tree/master/lua.
2019-06-28 16:51:45 +02:00