changed: a function can have a postfix now e.g. [my_function:my_postfix]

this will be mainly used in conjuction with [for ...] statements

[for my_function:xxx]
  [for my_function]
    [my_function_value]
    [my_function_valu:xxx] (references the first loop)
  [end]
[end]

added: to FunInfo<>: a reference to current item from a pattern (const Item & item)
       similary on the stack is added a pointer to an item
       by having this reference you can compare a function's name and its postfix
       added methods:
       Stack * FindLastFor(const std::wstring & name);
       Stack * FindLastFor(const std::wstring & name, const std::wstring & postfix);
       template<class FunUserObject> FunUserObject * FindUserObject(const std::wstring & function_name, Stack ** ezc_stack = 0);




git-svn-id: svn://ttmath.org/publicrep/ezc/trunk@1038 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
2016-04-04 15:53:11 +00:00
parent 18696d412b
commit 363605bde5
6 changed files with 71 additions and 36 deletions
+3 -2
View File
@@ -5,7 +5,7 @@
*/
/*
* Copyright (c) 2007-2015, Tomasz Sowa
* Copyright (c) 2007-2016, Tomasz Sowa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -152,11 +152,12 @@ private:
bool IsPositiveNumber(const std::wstring & str);
bool ReadName(std::wstring & name);
bool ReadFunctionName(std::wstring & name, std::wstring & postfix);
bool ReadString(std::wstring & str);
bool ReadNestedFunction(Item::Function & function);
bool ReadParamString(Item::Function & function);
bool ReadParams(Item::Function & function);
bool ReadFunction(Item::Function & function, bool with_params);
bool ReadFunction(Item::Function & function, bool with_params, const std::wstring * function_name = 0);
bool ReadFunction(Item & item);
void ReadDirectiveIf(Item & item);