7#ifndef XFA_FXFA_FORMCALC_CXFA_FMPARSER_H_
8#define XFA_FXFA_FORMCALC_CXFA_FMPARSER_H_
12#include "core/fxcrt/unowned_ptr_exclusion.h"
13#include "fxjs/gc/heap.h"
14#include "third_party/abseil-cpp/absl/types/optional.h"
15#include "v8/include/cppgc/macros.h"
16#include "v8/include/cppgc/member.h"
17#include "xfa/fxfa/formcalc/cxfa_fmexpression.h"
18#include "xfa/fxfa/formcalc/cxfa_fmlexer.h"
21 CPPGC_STACK_ALLOCATED();
32 m_max_parse_depth = max_depth;
38 bool IncrementParseDepthAndCheck();
70 unsigned long m_parse_depth = 0;
71 unsigned long m_max_parse_depth;
const FXJSE_CLASS_DESCRIPTOR kFormCalcDescriptor
void SetScale(uint8_t newScale)
CFGAS_Decimal(uint64_t val)
CFGAS_Decimal(float val, uint8_t scale)
CFGAS_Decimal(WideStringView str)
CFGAS_Decimal operator*(const CFGAS_Decimal &val) const
CFGAS_Decimal(uint32_t val)
WideString ToWideString() const
CFGAS_Decimal operator/(const CFGAS_Decimal &val) const
CFGAS_Decimal(int32_t val)
XFA_SCRIPTATTRIBUTEINFO script_attribute
CXFA_Object * GetThisObject() const
friend class EventParamScope
v8::Local< v8::Value > GlobalPropertyGetter()
static ByteString Local2IsoDate(CFXJSE_HostObject *pThis, ByteStringView bsDate, ByteStringView bsFormat, ByteStringView bsLocale)
static ByteString Num2AllTime(CFXJSE_HostObject *pThis, int32_t iTime, ByteStringView bsFormat, ByteStringView bsLocale, bool bGM)
CXFA_Document * GetDocument() const
static ByteString GetStandardTimeFormat(CFXJSE_HostObject *pThis, int32_t iStyle, ByteStringView bsLocale)
static ByteString GetStandardDateFormat(CFXJSE_HostObject *pThis, int32_t iStyle, ByteStringView bsLocale)
CFXJSE_FormCalcContext * AsFormCalcContext() override
static ByteString GetLocalDateFormat(CFXJSE_HostObject *pThis, int32_t iStyle, ByteStringView bsLocale, bool bStandard)
~CFXJSE_FormCalcContext() override
CFXJSE_FormCalcContext(v8::Isolate *pIsolate, CFXJSE_Context *pScriptContext, CXFA_Document *pDoc)
static ByteString GetLocalTimeFormat(CFXJSE_HostObject *pThis, int32_t iStyle, ByteStringView bsLocale, bool bStandard)
static ByteString IsoDate2Local(CFXJSE_HostObject *pThis, ByteStringView bsDate, ByteStringView bsFormat, ByteStringView bsLocale)
static ByteString IsoTime2Local(CFXJSE_HostObject *pThis, ByteStringView bsTime, ByteStringView bsFormat, ByteStringView bsLocale)
virtual CFXJSE_FormCalcContext * AsFormCalcContext()
uint8_t GetSecond() const
uint8_t GetMinute() const
uint16_t GetMillisecond() const
CXFA_FFNotify * GetNotify() const
CXFA_LocaleMgr * GetLocaleMgr()
CFXJSE_Engine * GetScriptContext() const
virtual bool PostRequestURL(const WideString &wsURL, const WideString &wsData, const WideString &wsContentType, const WideString &wsEncode, const WideString &wsHeader, WideString &wsResponse)=0
virtual bool PutRequestURL(const WideString &wsURL, const WideString &wsData, const WideString &wsEncode)=0
CXFA_FFApp::CallbackIface * GetAppProvider()
CXFA_FMParser(cppgc::Heap *heap, CXFA_FMLexer *pLexer)
void SetMaxParseDepthForTest(unsigned long max_depth)
GCedLocaleIface * GetDefLocale() override
GCedLocaleIface * GetLocaleByName(const WideString &wsLocaleName) override
CXFA_LocaleValue(ValueType dwType, const WideString &wsValue, const WideString &wsFormat, GCedLocaleIface *pLocale, CXFA_LocaleMgr *pLocaleMgr)
double GetDoubleNum() const
CFX_DateTime GetTime() const
const WideString & GetValue() const
CFX_DateTime GetDate() const
bool FormatPatterns(WideString &wsResult, const WideString &wsFormat, GCedLocaleIface *pLocale, XFA_ValuePicture eValueType) const
GCedLocaleIface * GetLocale()
int GetTimeZoneInMinutes() const
virtual WideString GetDatePattern(DateTimeSubcategory eType) const =0
virtual int GetTimeZoneInMinutes() const =0
virtual WideString GetDateTimeSymbols() const =0
virtual WideString GetTimePattern(DateTimeSubcategory eType) const =0
ByteString(const char *ptr)
bool EqualNoCase(ByteStringView str) const
static ByteString Format(const char *pFormat,...)
ByteString & operator+=(const ByteString &str)
ByteString & operator+=(char ch)
static ByteString FormatInteger(int i)
bool operator==(const ByteString &other) const
bool operator==(const char *ptr) const
ByteString & operator+=(const char *str)
const char * c_str() const
ByteString & operator=(const ByteString &that)
int Compare(ByteStringView str) const
ByteString ToUTF8() const
WideString & operator=(WideString &&that) noexcept
static WideString FromUTF8(ByteStringView str)
CharType operator[](const size_t index) const
const wchar_t * c_str() const
WideString(const wchar_t *ptr)
ByteString ToASCII() const
static WideString FromASCII(ByteStringView str)
void AppendChar(wchar_t wch)
WideString MakeString() const
WideStringView AsStringView() const
CXFA_Node * ToNode(CXFA_Object *pObj)
time_t FXSYS_time(time_t *tloc)
int FXSYS_WideHexCharToInt(wchar_t c)
bool FXSYS_IsDecimalDigit(wchar_t c)
bool FXSYS_IsWideHexDigit(wchar_t c)
struct tm * FXSYS_localtime(const time_t *tp)
void FX_Random_GenerateMT(uint32_t *pBuffer, int32_t iCount)
int32_t FXSYS_atoi(const char *str)
ByteString operator+(const ByteString &str1, const ByteString &str2)
WideString operator+(const WideString &str1, const WideString &str2)
ByteString operator+(const ByteString &str1, const char *str2)
WideString operator+(const wchar_t *str1, const WideString &str2)
WideString operator+(const WideString &str1, const wchar_t *str2)
bool IsBoolean(v8::Local< v8::Value > value)
bool IsArray(v8::Local< v8::Value > value)
bool IsUndefined(v8::Local< v8::Value > value)
bool IsNumber(v8::Local< v8::Value > value)
bool IsObject(v8::Local< v8::Value > value)
bool IsString(v8::Local< v8::Value > value)
ByteString ReentrantToByteStringHelper(v8::Isolate *pIsolate, v8::Local< v8::Value > pValue)
bool ReentrantToBooleanHelper(v8::Isolate *pIsolate, v8::Local< v8::Value > pValue)
bool IsNull(v8::Local< v8::Value > value)
int32_t ReentrantToInt32Helper(v8::Isolate *pIsolate, v8::Local< v8::Value > pValue)
XFA_ScriptType eValueType
XFA_ATTRIBUTE_CALLBACK callback
#define UNOWNED_PTR_EXCLUSION