From 4b3a1888e8186f25a1e9fdb9b7ef09acd3eecaee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Techet?= Date: Sun, 16 Apr 2023 20:22:22 +0200 Subject: [PATCH 1/2] autoit: Drop $ from variable names At least PHP, which also declares variables using $, such as $x = 5; outputs pure variable name without the $ prefix and this patch unifies this behavior. --- Units/parser-autoit.r/simple-au3.d/expected.tags | 10 +++++----- parsers/autoit.c | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Units/parser-autoit.r/simple-au3.d/expected.tags b/Units/parser-autoit.r/simple-au3.d/expected.tags index ede88c141c..d732b78795 100644 --- a/Units/parser-autoit.r/simple-au3.d/expected.tags +++ b/Units/parser-autoit.r/simple-au3.d/expected.tags @@ -1,8 +1,3 @@ -$iDoubled input.au3 /^Local $iDoubled = 0$/;" l roles:def -$iFirst input.au3 /^ LOCAL STATIC $iFirst = 0$/;" l func:All functions.MyDummy roles:def properties:static -$iNumber input.au3 /^Local $iNumber = 10$/;" l roles:def -$iSecond input.au3 /^ STATIC LOCAL $iSecond = 1$/;" l func:All functions.MyDummy roles:def properties:static -$iSomething input.au3 /^ Local $iSomething = 42$/;" l func:All functions.MyDouble0 roles:def All functions input.au3 /^#Region All functions$/;" r roles:def end:54 Constants.au3 input.au3 /^#include $/;" S roles:system GUIConstantsEx.au3 input.au3 /^#include$/;" S roles:system @@ -12,3 +7,8 @@ MyDouble1 input.au3 /^ FUNC MyDouble1($iValue)$/;" f region:All functions si MyDummy input.au3 /^FUNC MyDummy($iValue)$/;" f region:All functions signature:($iValue) roles:def end:53 MyVolatileDouble input.au3 /^Volatile Func MyVolatileDouble ($iValue)$/;" f region:All functions signature:($iValue) roles:def end:47 properties:volatile WindowsConstants.au3 input.au3 /^#include "WindowsConstants.au3"$/;" S roles:local +iDoubled input.au3 /^Local $iDoubled = 0$/;" l roles:def +iFirst input.au3 /^ LOCAL STATIC $iFirst = 0$/;" l func:All functions.MyDummy roles:def properties:static +iNumber input.au3 /^Local $iNumber = 10$/;" l roles:def +iSecond input.au3 /^ STATIC LOCAL $iSecond = 1$/;" l func:All functions.MyDummy roles:def properties:static +iSomething input.au3 /^ Local $iSomething = 42$/;" l func:All functions.MyDouble0 roles:def diff --git a/parsers/autoit.c b/parsers/autoit.c index 5236573036..8cc9b6386f 100644 --- a/parsers/autoit.c +++ b/parsers/autoit.c @@ -281,7 +281,7 @@ static void findAutoItTags (void) skipSpaces (&p); if (*p == '$') { - vStringPut (name, (int) *p++); + p++; while (isIdentChar ((int) *p)) { vStringPut (name, (int) *p); From 85fa80ad4101099bcd0ada83ce1202e4a2e2f9d0 Mon Sep 17 00:00:00 2001 From: Masatake YAMATO Date: Thu, 27 Apr 2023 10:30:13 +0900 Subject: [PATCH 2/2] AutoIt: set the parser-version 1.0 The change in the last commit for the parser is not small. So I increment the current, and set 0 to age. Signed-off-by: Masatake YAMATO --- docs/man-pages.rst | 1 + docs/man/ctags-lang-autoit.7.rst | 33 ++++++++++++++++++++++++++++++++ man/GNUmakefile.am | 1 + man/ctags-lang-autoit.7.rst.in | 33 ++++++++++++++++++++++++++++++++ parsers/autoit.c | 2 ++ 5 files changed, 70 insertions(+) create mode 100644 docs/man/ctags-lang-autoit.7.rst create mode 100644 man/ctags-lang-autoit.7.rst.in diff --git a/docs/man-pages.rst b/docs/man-pages.rst index b0c75da344..bb1e048f6f 100644 --- a/docs/man-pages.rst +++ b/docs/man-pages.rst @@ -17,6 +17,7 @@ Man pages ctags-faq(7) ctags-lang-asm(7) + ctags-lang-autoit(7) ctags-lang-elm(7) ctags-lang-fortran(7) ctags-lang-gdscript(7) diff --git a/docs/man/ctags-lang-autoit.7.rst b/docs/man/ctags-lang-autoit.7.rst new file mode 100644 index 0000000000..65d57bfc2a --- /dev/null +++ b/docs/man/ctags-lang-autoit.7.rst @@ -0,0 +1,33 @@ +.. _ctags-lang-autoit(7): + +============================================================== +ctags-lang-autoit +============================================================== + +Random notes about tagging AutoIt source code with Universal Ctags + +:Version: 6.0.0 +:Manual group: Universal Ctags +:Manual section: 7 + +SYNOPSIS +-------- +| **ctags** ... --languages=+AutoIt ... +| **ctags** ... --language-force=AutoIt ... +| **ctags** ... --map-AutoIt=+.au3 ... + +DESCRIPTION +----------- +This man page gathers random notes about tagging AutoIt source code. + +VERSIONS +-------- + +Change since "0.0" +~~~~~~~~~~~~~~~~~~ + +* Drop ``$`` from tags for variables names. + +SEE ALSO +-------- +:ref:`ctags(1) ` diff --git a/man/GNUmakefile.am b/man/GNUmakefile.am index ecd562aa6f..8639892eca 100644 --- a/man/GNUmakefile.am +++ b/man/GNUmakefile.am @@ -28,6 +28,7 @@ GEN_IN_MAN_FILES = \ ctags-faq.7 \ \ ctags-lang-asm.7 \ + ctags-lang-autoit.7 \ ctags-lang-elm.7 \ ctags-lang-fortran.7 \ ctags-lang-gdscript.7 \ diff --git a/man/ctags-lang-autoit.7.rst.in b/man/ctags-lang-autoit.7.rst.in new file mode 100644 index 0000000000..0ef5eb10b5 --- /dev/null +++ b/man/ctags-lang-autoit.7.rst.in @@ -0,0 +1,33 @@ +.. _ctags-lang-autoit(7): + +============================================================== +ctags-lang-autoit +============================================================== +--------------------------------------------------------------------- +Random notes about tagging AutoIt source code with Universal Ctags +--------------------------------------------------------------------- +:Version: @VERSION@ +:Manual group: Universal Ctags +:Manual section: 7 + +SYNOPSIS +-------- +| **@CTAGS_NAME_EXECUTABLE@** ... --languages=+AutoIt ... +| **@CTAGS_NAME_EXECUTABLE@** ... --language-force=AutoIt ... +| **@CTAGS_NAME_EXECUTABLE@** ... --map-AutoIt=+.au3 ... + +DESCRIPTION +----------- +This man page gathers random notes about tagging AutoIt source code. + +VERSIONS +-------- + +Change since "0.0" +~~~~~~~~~~~~~~~~~~ + +* Drop ``$`` from tags for variables names. + +SEE ALSO +-------- +ctags(1) diff --git a/parsers/autoit.c b/parsers/autoit.c index 8cc9b6386f..1c99025719 100644 --- a/parsers/autoit.c +++ b/parsers/autoit.c @@ -313,5 +313,7 @@ parserDefinition *AutoItParser (void) def->extensions = extensions; def->parser = findAutoItTags; def->useCork = CORK_QUEUE; + def->versionCurrent = 1; + def->versionAge = 0; return def; }