diff --git a/docs/pages/release_notes.md b/docs/pages/release_notes.md index 720dd44e3e..1c624b8efb 100644 --- a/docs/pages/release_notes.md +++ b/docs/pages/release_notes.md @@ -14,9 +14,10 @@ This is a {{ site.pmd.release_type }} release. ### New and noteworthy -#### Luau Support +#### Lua now supports additionally Luau -This release of PMD brings support for [Luau](https://github.com/Roblox/luau), a gradually typed language derived from Lua. +This release of PMD adds support for [Luau](https://github.com/Roblox/luau), a gradually typed language derived +from Lua. This means, that the Lua language in PMD can now parse both Lua and Luau. ### Fixed Issues * [#4116](https://github.com/pmd/pmd/pull/4116): \[core] Missing --file arg in TreeExport CLI example diff --git a/pmd-lua/src/main/antlr4/net/sourceforge/pmd/lang/lua/antlr4/Lua.g4 b/pmd-lua/src/main/antlr4/net/sourceforge/pmd/lang/lua/antlr4/Lua.g4 index fc94fa1b50..fde74727ac 100644 --- a/pmd-lua/src/main/antlr4/net/sourceforge/pmd/lang/lua/antlr4/Lua.g4 +++ b/pmd-lua/src/main/antlr4/net/sourceforge/pmd/lang/lua/antlr4/Lua.g4 @@ -108,6 +108,7 @@ label ; laststat + // "continue" is a luau addition and actually not a reserved keyword : 'return' explist? | 'break' | 'continue' ; diff --git a/pmd-lua/src/test/java/net/sourceforge/pmd/cpd/LuaTokenizerTest.java b/pmd-lua/src/test/java/net/sourceforge/pmd/cpd/LuaTokenizerTest.java index fb77931286..9c8705d4b4 100644 --- a/pmd-lua/src/test/java/net/sourceforge/pmd/cpd/LuaTokenizerTest.java +++ b/pmd-lua/src/test/java/net/sourceforge/pmd/cpd/LuaTokenizerTest.java @@ -41,7 +41,7 @@ public class LuaTokenizerTest extends CpdTextComparisonTest { } @Test - public void testRegression() { + public void testLuauTypes() { doTest("luauTypes"); }