From 0ac4df97e93e23fd59534db2779ccf35dec26bca Mon Sep 17 00:00:00 2001 From: Tomasz Sowa Date: Wed, 11 Dec 2024 17:29:32 +0100 Subject: [PATCH] WIP: add a Val struct as an input/output when calling a function --- src/generator.h | 1 + src/pattern.cpp | 19 +++++++++++++------ src/pattern.h | 15 --------------- 3 files changed, 14 insertions(+), 21 deletions(-) diff --git a/src/generator.h b/src/generator.h index b6a8bf6..053f53c 100644 --- a/src/generator.h +++ b/src/generator.h @@ -975,6 +975,7 @@ void Generator::Generate() ResizeStack(); ResizeBlockStack(); ResizeEzcFrameStack(); + InitializeTmpStreams(); filter_index = 0; stack_index = 0; ezc_frames_stack_index = 0; diff --git a/src/pattern.cpp b/src/pattern.cpp index c38980c..98b06e7 100644 --- a/src/pattern.cpp +++ b/src/pattern.cpp @@ -4,8 +4,8 @@ * Author: Tomasz Sowa */ -/* - * Copyright (c) 2007-2012, Tomasz Sowa +/* + * Copyright (c) 2007-2024, Tomasz Sowa * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -33,7 +33,6 @@ */ #include "pattern.h" -#include "utf8/utf8.h" namespace Ezc @@ -46,15 +45,12 @@ Pattern::Pattern() } - void Pattern::Clear() { item_root.Clear(); } - - void Pattern::CacheBlocks(Blocks & blocks) { Cache(blocks, item_root); @@ -67,6 +63,17 @@ void Pattern::ClearCache() } +void Pattern::CacheFunctions(Functions & fun) +{ + Cache(fun, item_root); +} + + +void Pattern::CacheObjects(Objects & obj) +{ + Cache(obj, item_root); +} + } // namespace Ezc diff --git a/src/pattern.h b/src/pattern.h index fe5e4cc..231565b 100644 --- a/src/pattern.h +++ b/src/pattern.h @@ -36,7 +36,6 @@ #ifndef headerfile_ezc_pattern #define headerfile_ezc_pattern -#include #include "item.h" #include "cache.h" #include "blocks.h" @@ -69,20 +68,6 @@ public: -void Pattern::CacheFunctions(Functions & fun) -{ - Cache(fun, item_root); -} - - -void Pattern::CacheObjects(Objects & obj) -{ - Cache(obj, item_root); -} - - - - } // namespace Ezc