summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/ControlReference/ExpressionParser.cpp
AgeCommit message (Collapse)Author
2024-08-20Remove redundant semicolonsDr. Dystopia
2024-07-28InputCommon: Translate ExpressionParser error messagesJosJuice
The _trans macro marks strings for translation but doesn't do anything at runtime. For that, we need to use a function like GetStringT.
2024-04-12ExpressionParser: Support unary plus operator.Jordan Woyak
2023-12-12Merge pull request #12399 from lioncash/erasingTilka
General: Make use of std::erase_if/std::erase where applicable
2023-12-12ExpressionParser: Avoid some miscellaneous copiesLioncash
Just some trivial copies that can be eliminated or turned into moves.
2023-12-12ExpressionParser: Mark constructors explicit where applicableLioncash
Makes for consistency with the surrounding code.
2023-12-12ExpressionParser: Pass control qualifiers by const referenceLioncash
These aren't necessarily cheap to copy, since a control qualifier will have around 3 std::strings inside of it, so passing by value can churn allocations a little bit.
2023-12-12ExpressionParser: Make use of std::erase_ifLioncash
2023-06-08Prefer static const std::regexget
std::regex has a relatively expensive constructor, and these are unchanging regexes.
2023-02-17InputCommon: Fix memory leak in ExpressionParserPokechu22
We allocate in MakeSuppressor via `return unique_ptr(std::make_unique<...>(...).release(), InvokingDeleter{}`, so it wasn't properly getting freed.
2022-07-25StripSpaces: only strip spacesShawn Hoffman
StripWhitespace maintains old behavior
2021-07-05treewide: convert GPLv2+ license info to SPDX tagsPierre Bourdon
SPDX standardizes how source code conveys its copyright and licensing information. See https://spdx.github.io/spdx-spec/1-rationale/ . SPDX tags are adopted in many large projects, including things like the Linux kernel.
2021-05-24Expose Control Expression variables to mappings UIFiloppi
-add a way to reset their value (from the mappings UI) -fix "memory leak" where they would never be cleaned, one would be created every time you wrote a character after a "$" -fix ability to create variables with an empty string by just writing "$" (+added error for it) -Add $ operator to the UI operators list, to expose this functionality even more
2021-05-12InputCommon: follow coding conventionsFiloppi
2021-05-12Add mixed comments to input code, make some tooltip clearerFiloppi
2021-04-28Merge pull request #9674 from Filoppi/fix_hotkey_suppresion_crashJordan Woyak
Fix hotkey suppression crash
2021-04-26InputCommon: small hotkey threshold symmetry fixFiloppi
2021-04-26InputCommon: fix hotkey suppression crash if nullptr suppressions were added ↵Filoppi
to the map Update references was failing to update the references, causing input to stay nullptr and crashing. I fixed the case that triggered that, though also added checks against nullptrs for safety. (cherry picked from commit 4bdcf707555a5568eddff957fa3604975ffb6ed7)
2021-04-02Replace uses of cassert with Common/Assert.hPokechu22
2020-10-20ExpressionParser: Add missing <functional> includeLioncash
Unbreaks Windows CMake builds.
2020-09-25ExpressionParser: Improve hotkey suppression logic. Allow activation with ↵Jordan Woyak
simultaneous press of modifier and final input.
2020-09-25ExpressionParser: Replace ScopeGuard with custom deleter unique_ptr.Jordan Woyak
2020-09-25InputCommon: Make hotkeys and input detection aware of Ctrl -> L_Ctrl / ↵Jordan Woyak
R_Ctrl hierarchy.
2020-09-25InputCommon: Clean up modifier ignoring logic.Jordan Woyak
2020-09-25ExpressionParser: Allow duplicate and superset modifier hotkeys to function.Jordan Woyak
2020-09-25ExpressionParser: Suppress inputs when hotkey modifiers are pressed.Jordan Woyak
2020-09-25ExpressionParser: Add Hotkey syntax.Jordan Woyak
2020-03-24Cleanup warnings of -Wmissing-declarationsJun Su
Add static to the functions which is not intentionally export to big scope.
2019-10-25InputCommon: Change "EOF" to "end of expression" in user facing stringJosJuice
This is hopefully clearer, since we're not dealing with a file.
2019-10-20ExpressionParser: Add XOR operator.Jordan Woyak
2019-10-12ExpressionParser: Make Lexer ctor explicit and move argument.Jordan Woyak
2019-10-12ExpressionParser: Add support for /* */ style comments.Jordan Woyak
2019-10-11ExpressionParser: Show error message with expected arguments.Jordan Woyak
2019-10-11ExpressionParser: Remove ! character from function syntax. Remove unused ↵Jordan Woyak
serialization functions.
2019-10-11ExpressionParser/DolphinQt: Added parse results to UI.Jordan Woyak
2019-10-11DolphinQT: Add syntax highlighting from tokenizer data.Jordan Woyak
2019-10-11ExpressionParser: Move FunctionExpression type definitions into another file.Jordan Woyak
2019-10-11ExpressionParser: Allow unary functions to be used without parens around the ↵Jordan Woyak
argument. e.g. !`Up`
2019-10-11ExpressionParser: Make function names case sensitive.Jordan Woyak
2019-10-11ExpressionParser: Rename some functions and return a syntax error on ↵Jordan Woyak
trailing tokens.
2019-10-11ExpressionParser: Change function argument syntax to something more c++-like.Jordan Woyak
2019-10-11ExpressionParser: Fix negative literals and support unary minus operator.Jordan Woyak
2019-10-11ExpressionParser: Suppport N-ary functions. Arguments are read LISP style. N ↵Jordan Woyak
atoms are read after the function name. Added "if" function and made the "while" function more sensible with an arity of 2. Removed the ugly binary conditional operator.
2019-10-11ExpressionParser: Replace the timer literal with a timer function that ↵Jordan Woyak
increases from 0.0 to 1.0 and resets after N seconds. e.g. (!timer 2.0) is a 2 second timer. Fixed parsing of unary expressions so things like (! ! 1.0) work.
2019-10-11ExpressionParser: Clean up string lexing and support numeric literals ↵Jordan Woyak
without tick delimiter: e.g. 0.75
2019-10-11ExpressionParser: operator precedence.Jordan Woyak
2019-10-11ExpressionParser: Add !while loop unary expression. Limited to 10000 reps to ↵Jordan Woyak
prevent infinite loops. Rhs is re-evaluated until it is < 0.5. Added comma operator, which behaves like it does in c++. Added subration operator.
2019-10-11ExpressionParser: cleanup.Jordan Woyak
2019-10-11ExpressionParser: Conditional operator. A binary op that evals the rhs if ↵Jordan Woyak
lhs > 0.5 else 0.0.
2019-10-11ExpressionParser: Add less-than and greater-than operators.Jordan Woyak