This commit is contained in:
Aoran Zeng
2025-07-15 19:02:31 +08:00
parent 5ac415801c
commit 02f08acf5c
2 changed files with 40 additions and 38 deletions

View File

@@ -5,7 +5,7 @@
# File Authors : Aoran Zeng <ccmywish@qq.com>
# Contributors : Nul None <nul@none.org>
# Created On : <2025-07-12>
# Last Modified : <2025-07-14>
# Last Modified : <2025-07-15>
#
# rawstr4c.md parsing
# ---------------------------------------------------------------
@@ -18,8 +18,8 @@ my enum ConfigValueType <String Mode Boolean>;
#|
my class ConfigValue {
has ConfigValueType $.type;
has $.raw-value;
has $.parsed-value;
has Str $.raw-value;
has Any $.parsed-value;
method new($raw-text) {
my $type;
@@ -108,20 +108,20 @@ my class Config {
Global dom code block. code block Section dom
Parser :
- IO::Path $input-file
- Hash $global-config
- @sections is Array[Hash] ( $section)
- input-file
- global-config
- sections ( section)
$section Hash:
section Hash:
- title
- level
- raw-string
- config
)
class Parser {
has $.input-file is rw;
has $.global-config;
has @.sections;
has IO::Path $.input-file is rw;
has Config $.global-config;
has Hash @.sections;
method new($input-file) {
self.bless(