Move to sub lib

This commit is contained in:
Aoran Zeng 2025-07-21 01:28:29 +08:00
parent 47129d36f7
commit 3eb948f1cf
No known key found for this signature in database
GPG Key ID: 8F8BA8488E10ED98
5 changed files with 18 additions and 18 deletions

View File

@ -14,13 +14,13 @@
# Raw strings for the C programming language # Raw strings for the C programming language
# --------------------------------------------------------------- # ---------------------------------------------------------------
use Parser; use Rawstr4c::Parser;
use Generator; use Rawstr4c::Generator;
use Version; use Rawstr4c::Version;
sub USAGE() { sub USAGE() {
print qq:to/END/; print qq:to/END/;
rawstr4c: Raw String for C (GPLv3+) v{Version::VERSION}-{Version::RELEASE_DATE} rawstr4c: Raw String for C (GPLv3+) v{Rawstr4c::Version::VERSION}-{Rawstr4c::Version::RELEASE_DATE}
Usage: rawstr4c [options] <FILE.md|DIR> Usage: rawstr4c [options] <FILE.md|DIR>

View File

@ -10,14 +10,14 @@
# Represent a section's working configuration # Represent a section's working configuration
# --------------------------------------------------------------- # ---------------------------------------------------------------
use Parser; use Rawstr4c::Parser;
unit module Config; unit module Rawstr4c::Config;
#| section () #| section ()
class SectionConfig { class SectionConfig {
has Parser::Section $.section; has Rawstr4c::Parser::Section $.section;
method new($section) { method new($section) {
self.bless(:$section); self.bless(:$section);

View File

@ -10,11 +10,11 @@
# Generates C code from rawstr4c configuration # Generates C code from rawstr4c configuration
# --------------------------------------------------------------- # ---------------------------------------------------------------
unit module Generator; unit module Rawstr4c::Generator;
use Parser; use Rawstr4c::Parser;
use Config; use Rawstr4c::Config;
use Version; use Rawstr4c::Version;
my class CStringConverter { my class CStringConverter {
@ -198,11 +198,11 @@ my class CVariableGenerator {
class Generator { class Generator {
has Bool $!enable-debug = False; # 是否启用调试模式 has Bool $!enable-debug = False; # 是否启用调试模式
has Parser::Parser $.parser; has Rawstr4c::Parser::Parser $.parser;
has CStringConverter $.string-converter; has CStringConverter $.string-converter;
has CVariableNameGenerator $.varname-generator; has CVariableNameGenerator $.varname-generator;
has CVariableGenerator $.variable-generator; has CVariableGenerator $.variable-generator;
method new($parser) { method new($parser) {
self.bless( self.bless(

View File

@ -10,7 +10,7 @@
# rawstr4c.md parsing # rawstr4c.md parsing
# --------------------------------------------------------------- # ---------------------------------------------------------------
unit module Parser; unit module Rawstr4c::Parser;
#| Bool Boolean #| Bool Boolean
my enum ConfigItem's-ValueType < RS4C-Nil RS4C-String RS4C-Mode RS4C-Bool>; my enum ConfigItem's-ValueType < RS4C-Nil RS4C-String RS4C-Mode RS4C-Bool>;

View File

@ -8,7 +8,7 @@
# Last Modified : <2025-07-16> # Last Modified : <2025-07-16>
# --------------------------------------------------------------- # ---------------------------------------------------------------
unit module Version; unit module Rawstr4c::Version;
constant VERSION = "0.2.1.0"; constant VERSION = "0.2.1.0";
constant RELEASE_DATE = "2025/07/16"; constant RELEASE_DATE = "2025/07/16";