forked from universal-ctags/ctags
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Continuation of universal-ctags#1581. Signed-off-by: Masatake YAMATO <yamato@redhat.com>
- Loading branch information
Showing
9 changed files
with
129 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--sort=no | ||
--extras=+g | ||
--fields=+ln |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
slot input.vue /^ <p id="slot">{{ greeting }} World!<\/p>$/;" I line:4 language:HTML | ||
makeWord input.vue /^function makeWord ()$/;" f line:8 language:JavaScript | ||
data input.vue /^ data: function () {$/;" m line:14 language:JavaScript class:module.exports | ||
exports input.vue /^module.exports = {$/;" c line:13 language:JavaScript class:module | ||
p input.vue /^p {$/;" s line:23 language:CSS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<!-- Taken from https://vuejs.org/v2/guide/single-file-components.html --> | ||
|
||
<template> | ||
<p id="slot">{{ greeting }} World!</p> | ||
</template> | ||
|
||
<script> | ||
function makeWord () | ||
{ | ||
return 'Hello'; | ||
} | ||
module.exports = { | ||
data: function () { | ||
return { | ||
greeting: makeWord () | ||
} | ||
} | ||
} | ||
</script> | ||
|
||
<style scoped> | ||
p { | ||
font-size: 2em; | ||
text-align: center; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
/* | ||
* Generated by ./misc/optlib2c from optlib/vue.ctags, Don't edit this manually. | ||
*/ | ||
#include "general.h" | ||
#include "parse.h" | ||
#include "routines.h" | ||
#include "field.h" | ||
#include "xtag.h" | ||
|
||
|
||
static void initializeVueParser (const langType language CTAGS_ATTR_UNUSED) | ||
{ | ||
} | ||
|
||
extern parserDefinition* VueParser (void) | ||
{ | ||
static const char *const extensions [] = { | ||
"vue", | ||
NULL | ||
}; | ||
|
||
static const char *const aliases [] = { | ||
NULL | ||
}; | ||
|
||
static const char *const patterns [] = { | ||
NULL | ||
}; | ||
|
||
static tagRegexTable VueTagRegexTable [] = { | ||
{"<template>\n((.|\n){1,}\n)</template>", "", | ||
"", "{_guest=HTML,1start,1end}", NULL, true}, | ||
{"<script>\n((.|\n){1,}\n)</script>", "", | ||
"", "{_guest=JavaScript,1start,1end}", NULL, true}, | ||
{"<style([ ]{1,}[a-z]{1,})*>\n((.|\n){1,}\n)</style>", "", | ||
"", "{_guest=CSS,2start,2end}", NULL, true}, | ||
}; | ||
|
||
|
||
parserDefinition* const def = parserNew ("Vue"); | ||
|
||
def->enabled = true; | ||
def->extensions = extensions; | ||
def->patterns = patterns; | ||
def->aliases = aliases; | ||
def->method = METHOD_NOT_CRAFTED|METHOD_REGEX; | ||
def->tagRegexTable = VueTagRegexTable; | ||
def->tagRegexCount = ARRAY_SIZE(VueTagRegexTable); | ||
def->initialize = initializeVueParser; | ||
|
||
return def; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# | ||
# vue.ctags --- a parser for VueJS Single File Components | ||
# | ||
# Copyright (c) 2019, Red Hat, Inc. | ||
# Copyright (c) 2019, Masatake YAMATO | ||
# | ||
# Author: Masatake YAMATO <yamato@redhat.com> | ||
# | ||
# This program is free software; you can redistribute it and/or | ||
# modify it under the terms of the GNU General Public License | ||
# as published by the Free Software Foundation; either version 2 | ||
# of the License, or (at your option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with this program; if not, write to the Free Software | ||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, | ||
# USA. | ||
# | ||
# | ||
# References: | ||
# | ||
# - https://vuejs.org/v2/guide/single-file-components.html | ||
# | ||
--langdef=Vue | ||
--map-Vue=+.vue | ||
|
||
--mline-regex-Vue=/<template>\n((.|\n){1,}\n)<\/template>//{_guest=HTML,1start,1end} | ||
--mline-regex-Vue=/<script>\n((.|\n){1,}\n)<\/script>//{_guest=JavaScript,1start,1end} | ||
--mline-regex-Vue=/<style([ ]{1,}[a-z]{1,})*>\n((.|\n){1,}\n)<\/style>//{_guest=CSS,2start,2end} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters