Regular Expressions 101

Community Patterns

Lua Enhanced: function application compound operator

1

Regular Expression
Python

r"
(\w+?) +f\((.+?)\)= *(.+)
"
gm

Description

This is a compound operator that takes a variable and a

Example:

local x = 9
x f(math.max)= 10

compiles to

local x = 9
x = math.max(9, 10)

which results into x being assigned 10.

Submitted by anonymous - 2 years ago