feat: support affiliated keyword

This commit is contained in:
PoiScript 2023-11-15 00:03:16 +08:00
parent a269f2f258
commit 1362624083
No known key found for this signature in database
GPG key ID: 22C2B1249D99985E
34 changed files with 946 additions and 399 deletions

View file

@ -1,7 +1,7 @@
use nom::{IResult, InputTake};
use super::{
combinator::{blank_lines, debug_assert_lossless, line_ends_iter, node, GreenElement},
combinator::{blank_lines, line_ends_iter, node, GreenElement},
input::Input,
SyntaxKind,
};
@ -33,8 +33,9 @@ fn comment_node_base(input: Input) -> IResult<Input, GreenElement, ()> {
Ok((input, node(SyntaxKind::COMMENT, children)))
}
#[tracing::instrument(level = "debug", skip(input), fields(input = input.s))]
pub fn comment_node(input: Input) -> IResult<Input, GreenElement, ()> {
debug_assert_lossless(comment_node_base)(input)
crate::lossless_parser!(comment_node_base, input)
}
#[test]