diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2023-06-23 14:56:42 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2023-06-23 14:56:42 -0300 |
commit | 664da61c079f762d835ea6f875cdf3da96982bab (patch) | |
tree | 0acb6ddebd549b1efea9c875b641be02c75d6221 /re.lua | |
parent | 8bc00db24975f52b52e6ef8184c216ce2feae9fd (diff) | |
download | lpeg-664da61c079f762d835ea6f875cdf3da96982bab.tar.gz lpeg-664da61c079f762d835ea6f875cdf3da96982bab.tar.bz2 lpeg-664da61c079f762d835ea6f875cdf3da96982bab.zip |
Copyright notice in module 're'
Diffstat (limited to 're.lua')
-rw-r--r-- | re.lua | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -1,3 +1,7 @@ | |||
1 | -- | ||
2 | -- Copyright 2007-2023, Lua.org & PUC-Rio (see 'lpeg.html' for license) | ||
3 | -- written by Roberto Ierusalimschy | ||
4 | -- | ||
1 | 5 | ||
2 | -- imported functions and modules | 6 | -- imported functions and modules |
3 | local tonumber, type, print, error = tonumber, type, print, error | 7 | local tonumber, type, print, error = tonumber, type, print, error |
@@ -9,14 +13,14 @@ local m = require"lpeg" | |||
9 | -- on 'mm' | 13 | -- on 'mm' |
10 | local mm = m | 14 | local mm = m |
11 | 15 | ||
12 | -- pattern's metatable | 16 | -- patterns' metatable |
13 | local mt = getmetatable(mm.P(0)) | 17 | local mt = getmetatable(mm.P(0)) |
14 | 18 | ||
15 | 19 | ||
20 | local version = _VERSION | ||
16 | 21 | ||
17 | -- No more global accesses after this point | 22 | -- No more global accesses after this point |
18 | local version = _VERSION | 23 | _ENV = nil -- does no harm in Lua 5.1 |
19 | if version == "Lua 5.2" then _ENV = nil end | ||
20 | 24 | ||
21 | 25 | ||
22 | local any = m.P(1) | 26 | local any = m.P(1) |