From 42d3a6eec95791baabdae40355ee8e6d30a2ab3f Mon Sep 17 00:00:00 2001 From: Nfsaavedra Date: Mon, 3 Jun 2024 18:39:09 +0100 Subject: [PATCH] support ids that start with _ --- puppetparser/parser.py | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/puppetparser/parser.py b/puppetparser/parser.py index c78c55d..e393feb 100644 --- a/puppetparser/parser.py +++ b/puppetparser/parser.py @@ -305,7 +305,7 @@ def t_ID_TYPE(t: LexToken): return t def t_ID(t: LexToken): - r"([a-z\$]|(::))((::)?[A-Za-z0-9\_\-]*)*" + r"([a-z_\$]|(::))((::)?[A-Za-z0-9\_\-]*)*" t.type = keywords.get(t.value, statement_functions.get(t.value, "ID")) return t diff --git a/pyproject.toml b/pyproject.toml index e1a1797..1f63e0a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "puppetparser" -version = "0.2.11" +version = "0.2.12" description = "A parser from Puppet to an object model" authors = ["Nuno Saavedra "] license = "GPL-3.0"