diff options
| author | orbitalquark <70453897+orbitalquark@users.noreply.github.com> | 2024-09-18 14:30:49 -0400 |
|---|---|---|
| committer | Randy Palamar <randy@rnpnr.xyz> | 2025-01-04 12:29:07 -0700 |
| commit | c1f4d3f68787fa2ae964c468d28a84df37319b28 (patch) | |
| tree | dcd62bd74f8f9fd786cba6a0c248fb388d5244a8 /lua/lexers/vcard.lua | |
| parent | cc18cea14d1f836abcebb84a96f5029431474255 (diff) | |
| download | vis-c1f4d3f68787fa2ae964c468d28a84df37319b28.tar.gz vis-c1f4d3f68787fa2ae964c468d28a84df37319b28.tar.xz | |
lexers: switch to tabs for indentation
Diffstat (limited to 'lua/lexers/vcard.lua')
| -rw-r--r-- | lua/lexers/vcard.lua | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/lua/lexers/vcard.lua b/lua/lexers/vcard.lua index 737bdef..025fcc6 100644 --- a/lua/lexers/vcard.lua +++ b/lua/lexers/vcard.lua @@ -12,51 +12,51 @@ lex:add_rule('whitespace', token(lexer.WHITESPACE, lexer.space^1)) -- Begin vCard, end vCard. lex:add_rule('begin_sequence', token(lexer.KEYWORD, 'BEGIN') * token(lexer.OPERATOR, ':') * - token(lexer.COMMENT, 'VCARD')) + token(lexer.COMMENT, 'VCARD')) lex:add_rule('end_sequence', token(lexer.KEYWORD, 'END') * token(lexer.OPERATOR, ':') * - token(lexer.COMMENT, 'VCARD')) + token(lexer.COMMENT, 'VCARD')) -- vCard version (in v3.0 and v4.0 must appear immediately after BEGIN:VCARD). lex:add_rule('version_sequence', token(lexer.KEYWORD, 'VERSION') * token(lexer.OPERATOR, ':') * - token(lexer.CONSTANT, lexer.digit^1 * ('.' * lexer.digit^1)^-1)) + token(lexer.CONSTANT, lexer.digit^1 * ('.' * lexer.digit^1)^-1)) -- Required properties. local required_property = token(lexer.KEYWORD, word_match({ - 'BEGIN', 'END', 'FN', 'VERSION', -- - 'N' -- Not required in v4.0. + 'BEGIN', 'END', 'FN', 'VERSION', -- + 'N' -- Not required in v4.0. }, true)) * #P(':') lex:add_rule('required_property', required_property) -- Supported properties. local supported_property = token(lexer.TYPE, word_match({ - 'ADR', 'BDAY', 'CATEGORIES', 'EMAIL', 'END', 'GEO', 'KEY', 'LOGO', 'NOTE', 'ORG', 'PHOTO', 'REV', - 'ROLE', 'SOUND', 'SOURCE', 'TEL', 'TITLE', 'TZ', 'UID', 'URL', - -- Supported in v4.0 only. - 'ANNIVERSARY', 'CALADRURI', 'CALURI', 'CLIENTPIDMAP', 'FBURL', 'GENDER', 'KIND', 'LANG', 'MEMBER', - 'RELATED', 'XML', - -- Not supported in v4.0. - 'AGENT', 'LABEL', 'MAILER', 'PROFILE', 'SORT-STRING', - -- Supported in v3.0 only. - 'CLASS', 'NAME', - -- Not supported in v2.1. - 'IMPP', 'NICKNAME', 'PRODID' + 'ADR', 'BDAY', 'CATEGORIES', 'EMAIL', 'END', 'GEO', 'KEY', 'LOGO', 'NOTE', 'ORG', 'PHOTO', 'REV', + 'ROLE', 'SOUND', 'SOURCE', 'TEL', 'TITLE', 'TZ', 'UID', 'URL', + -- Supported in v4.0 only. + 'ANNIVERSARY', 'CALADRURI', 'CALURI', 'CLIENTPIDMAP', 'FBURL', 'GENDER', 'KIND', 'LANG', 'MEMBER', + 'RELATED', 'XML', + -- Not supported in v4.0. + 'AGENT', 'LABEL', 'MAILER', 'PROFILE', 'SORT-STRING', + -- Supported in v3.0 only. + 'CLASS', 'NAME', + -- Not supported in v2.1. + 'IMPP', 'NICKNAME', 'PRODID' }, true)) * #S(':;') lex:add_rule('supported_property', supported_property) -- Group and property. local identifier = lexer.alpha^1 * lexer.digit^0 * ('-' * lexer.alnum^1)^0 local property = required_property + supported_property + - lexer.token(lexer.TYPE, S('xX') * '-' * identifier) * #S(':;') + lexer.token(lexer.TYPE, S('xX') * '-' * identifier) * #S(':;') lex:add_rule('group_sequence', token(lexer.CONSTANT, lexer.starts_line(identifier)) * - token(lexer.OPERATOR, '.') * property) + token(lexer.OPERATOR, '.') * property) -- Extension. lex:add_rule('extension', - token(lexer.TYPE, lexer.starts_line(S('xX') * '-' * identifier * #S(':;')))) + token(lexer.TYPE, lexer.starts_line(S('xX') * '-' * identifier * #S(':;')))) -- Parameter. local parameter = (token(lexer.IDENTIFIER, lexer.starts_line(identifier)) + - token(lexer.STRING, identifier)) * #S(':=') + token(lexer.STRING, identifier)) * #S(':=') lex:add_rule('parameter', parameter) -- Operators. |
