More readme additions and another debug line out fix.

This commit is contained in:
Edward R. Gonzalez 2023-03-31 17:26:02 -04:00
parent 6bc4346652
commit e301b400ba
3 changed files with 19 additions and 16 deletions

View File

@ -16,10 +16,12 @@ on:
inputs:
type:
description: 'Meson buildtype (release, debug, etc.)'
default: release
required: false
test:
description: 'Run tests (test)'
default: test
required: false
jobs:

View File

@ -12,7 +12,7 @@ Refactor c/c++ files (and problably others) with ease.
## Syntax
* `not` Omit word or namespace.
* `not` Omit an a signature. (Modifies include, word, namespace, etc)
* `include` Preprocessor include `<file path>` related identifiers.
* `word` Fixed sized identifier.
* `namespace` Variable sized identifiers, mainly intended to redefine c-namespace of an identifier.
@ -68,7 +68,7 @@ If the `test` parameter is provided to the build scripts, the project and thirdp
With the refactors applied a meson configuraiton is setup (`meson.build` in test) and run to build. So long as it compiles, the feature set of the current version should work fine.
* There is an extra file `stb_image` that is currently be parsed but its unused.
* There is an extra file `stb_image` that is parsed but unused during compilation.
* Planned for use in the namespace addition todo.
## TODO:
@ -87,3 +87,5 @@ meet the signature of words or namespaces are refactored.
* This can honestly be done also with placing words on specific lines..
* Provide a GUI build.
* Provide as a single-header library.
* Better tests:
* Automatically pull the zpl repo, refactor and format the library, and package the single header before using it in testing.

View File

@ -224,14 +224,19 @@ void refactor()
uw Line;
};
#define move_forward( Amount_ ) \
if ( left - Amount_ <= 0 ) \
goto End_Search; \
\
line += src[0] == '\n'; \
left -= Amount_; \
col = (col + Amount_) * src[0] != '\n'; \
src += Amount_ \
#define move_forward( Amount_ ) \
do { \
if ( left - Amount_ <= 0 ) \
goto End_Search; \
\
const sw end = Amount_ - 1; \
\
line += src[end] == '\n'; \
left -= Amount_; \
col = (col + Amount_) * src[end] != '\n'; \
src += Amount_; \
} \
while (0) \
#define restore( Snapshot_ ) \
src = Snapshot_.Src; \
@ -589,12 +594,6 @@ void refactor()
}
Skip:
if ( src[0] == '\n' )
{
line++;
col = 0;
}
move_forward( 1 );
}
while ( left );