summaryrefslogtreecommitdiff
path: root/xfa/fxfa/fm2js/cxfa_fmexpression.h
AgeCommit message (Collapse)Author
2018-02-22[formcalc] Cleanup function handlingDan Sinclair
This CL creates a CXFA_FMAST root for the AST tree instead of overloading the CXFA_FMFunctionDefinition. This Removes the m_global from FunctionDefinition and simpifies the code. Change-Id: I9347769a291ef1753539701f334cc8dd69b7187e Reviewed-on: https://pdfium-review.googlesource.com/27590 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2018-02-21[formcalc] Cleanup if expression parsing.Dan Sinclair
This CL simplifies the if expression parsing. The elseif construct has been split into its own list of IfExpressions and no longer gets stuffed into the elseExpression. A loop was added into the output methods for the elseif expressions, which also means we can go from having: if () { } else { if () { } else { } } to if () { } else if () { } else { } Which is a bit nicer. Change-Id: I6edf75215500d6a32a8d7218d477b6960f03de51 Reviewed-on: https://pdfium-review.googlesource.com/27571 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-02-20[formcalc] Remove unused expression typeDan Sinclair
The expression type is no longer used, removed. Change-Id: I4c8b17ed1644560afd7fc87a7fb6c7d893b9de5c Reviewed-on: https://pdfium-review.googlesource.com/27450 Reviewed-by: Lei Zhang <thestig@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-02-20[formcalc] Remove unused line parameterDan Sinclair
The recorded line number from the formcalc parse is never used. This Cl removes the parameter and removes the need to pass it through all of the constructors. Change-Id: Ice716cc4880dd17dc05bffcdce1dc1e4745108ea Reviewed-on: https://pdfium-review.googlesource.com/27412 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-02-20Tighten up assignment instructions in formcalc.Dan Sinclair
The assignment operator can not be chained. This Cl removes the while loop for assignments and changes it to an if(). We also can not have an assignment inside ()'s so remove that option. Bug: chromium:779349 Change-Id: I6934e18815f843ae8241023df6c03d8bbcd8168d Reviewed-on: https://pdfium-review.googlesource.com/27350 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2018-02-19Cleanup FormCalc inheritancedan sinclair
This CL cleans up the FormCalc inheritance. The binary and unary items all share ToJavaScript methods now. Change-Id: I7bf0978449395fa2eb90b954cf2118d7aa3f71c6 Reviewed-on: https://pdfium-review.googlesource.com/27290 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-02-19Remove base class ToJavaScript methods in FormCalcdan sinclair
This CL removes the Loop base class as it adds no functionality. Other base classes have had their ToJavaScript methods set as pure virtual and their constructors made protected. Change-Id: I5c77b8734d23c576dd52db7f72396ecdf2f7bd22 Reviewed-on: https://pdfium-review.googlesource.com/27270 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-02-19Merge FormCalc to JavaScript methodsdan sinclair
This CL merges the ToJavaScript and the ToImpliedJS methods in the FormCalc expressions. The type of return is passed as a paramter to ToJavaScript. Change-Id: Idff83677bc70b964d95aa6ff6b0e2c1bf8c603ea Reviewed-on: https://pdfium-review.googlesource.com/27210 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-09-18Convert string class namesRyan Harrison
Automated using git grep & sed. Replace StringC classes with StringView classes. Remove the CFX_ prefix and put string classes in fxcrt namespace. Change AsStringC() to AsStringView(). Rename tests from TEST(fxcrt, *String*Foo) to TEST(*String*, Foo). Couple of tests needed to have their names regularlized. BUG=pdfium:894 Change-Id: I7ca038685c8d803795f3ed02545124f7a224c83d Reviewed-on: https://pdfium-review.googlesource.com/14151 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
2017-08-30Move CFX_WideTextBuf out of fx_basicDan Sinclair
This CL moves CFX_WideTextBuf to its own files and updates includes as needed. Change-Id: Ibe66ecf3e66f8f01dd8e9eaf6b467588be86ad4f Reviewed-on: https://pdfium-review.googlesource.com/12413 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-05-17Adding CXFA_Parse unittestsDan Sinclair
This CL adds the beginning of unittests for the CXFA_Parse code. Change-Id: I06e556f1a35405bc683c536d390071917ee330a6 Reviewed-on: https://pdfium-review.googlesource.com/5556 Reviewed-by: Nicolás Peña <npm@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-05-17Rename formcalc files to better match contentsDan Sinclair
Most files match the contents. The expression files are named to match their base type even though they contain all the expression subclasses. Change-Id: I3b7705c7b206a9fa1afae8b677f765e8b788e84d Reviewed-on: https://pdfium-review.googlesource.com/5492 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Nicolás Peña <npm@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>