mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-06 06:20:55 -08:00
; Fix last change
* src/treesit.c (Ftreesit_parser_create): Fix comment wording. * doc/lispref/parsing.texi (Using Parser): Fix wording and markup.
This commit is contained in:
parent
4581351556
commit
ad51b3b391
2 changed files with 6 additions and 6 deletions
|
|
@ -571,7 +571,7 @@ in the alist, creating a parser for @var{language-a} actually creates a
|
||||||
parser for @var{language-b}. By extension, anything that creates a node
|
parser for @var{language-b}. By extension, anything that creates a node
|
||||||
or makes a query of @var{language-a} will be redirected to use
|
or makes a query of @var{language-a} will be redirected to use
|
||||||
@var{language-b} instead. This mapping is completely transparent, the
|
@var{language-b} instead. This mapping is completely transparent, the
|
||||||
parser created will report as @var{language-b}, and the sames goes for
|
created parser will reported to use @var{language-b}, and the same goes for
|
||||||
nodes created by this parser.
|
nodes created by this parser.
|
||||||
|
|
||||||
Specifically, the parser created by @code{treesit-parser-create} will
|
Specifically, the parser created by @code{treesit-parser-create} will
|
||||||
|
|
@ -583,10 +583,10 @@ if language @code{cpp} is mapped to @code{cuda}:
|
||||||
(setq treesit-language-remap-alist '((cpp . cuda)))
|
(setq treesit-language-remap-alist '((cpp . cuda)))
|
||||||
|
|
||||||
(treesit-parser-language (treesit-parser-create 'cpp))
|
(treesit-parser-language (treesit-parser-create 'cpp))
|
||||||
;; => 'cpp
|
@result{} 'cpp
|
||||||
|
|
||||||
(treesit-parser-language (treesit-parser-create 'cuda))
|
(treesit-parser-language (treesit-parser-create 'cuda))
|
||||||
;; => 'cuda
|
@result{} 'cuda
|
||||||
@end group
|
@end group
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1688,9 +1688,9 @@ an indirect buffer. */)
|
||||||
ts_parser_set_language (parser, lang);
|
ts_parser_set_language (parser, lang);
|
||||||
|
|
||||||
/* Create parser. Use the unmapped LANGUAGE symbol, so the nodes
|
/* Create parser. Use the unmapped LANGUAGE symbol, so the nodes
|
||||||
created by this parser (and this parser) self identify as the
|
created by this parser (and the parser itself) identify themselves
|
||||||
unmapped language. This makes the grammar mapping completely
|
as the unmapped language. This makes the grammar mapping
|
||||||
transparent. */
|
completely transparent. */
|
||||||
Lisp_Object lisp_parser = make_treesit_parser (buf_orig,
|
Lisp_Object lisp_parser = make_treesit_parser (buf_orig,
|
||||||
parser, NULL,
|
parser, NULL,
|
||||||
language, tag);
|
language, tag);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue