forked from livecode/livecode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathurl.lcb
More file actions
85 lines (64 loc) · 2.63 KB
/
url.lcb
File metadata and controls
85 lines (64 loc) · 2.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
/*
Copyright (C) 2015 LiveCode Ltd.
This file is part of LiveCode.
LiveCode is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License v3 as published by the Free
Software Foundation.
LiveCode is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with LiveCode. If not see <http://www.gnu.org/licenses/>. */
/*
This module specifies the syntax definitions and bindings for url operations in modular LiveCode.
*/
module com.livecode.url
foreign handler FetchUrlTextFile(in Target as string, out Value as string) as undefined binds to "<builtin>"
foreign handler StoreUrlTextFile(in Value as string, in Target as string) as undefined binds to "<builtin>"
foreign handler FetchUrlBinaryFile(in Target as string, out Value as data) as undefined binds to "<builtin>"
foreign handler StoreUrlBinaryFile(in Value as data, in Target as string) as undefined binds to "<builtin>"
foreign handler StoreBeforeUrlTextFile(in Value as string, in Target as string) as undefined binds to "<builtin>"
foreign handler StoreAfterUrlTextFile(in Value as string, in Target as string) as undefined binds to "<builtin>"
foreign handler StoreBeforeUrlBinaryFile(in Value as data, in Target as string) as undefined binds to "<builtin>"
foreign handler StoreAfterUrlBinaryFile(in Value as data, in Target as string) as undefined binds to "<builtin>"
--
/*
Summary:
output:
input:
*/
syntax UrlTextFile is statement
"url" "file" <Target: Expression>
begin
FetchUrlTextFile(Target, output)
StoreUrlTextFile(input, Target)
end syntax
syntax UrlBinaryFile is statement
"url" "binfile" <Target: Expression>
begin
FetchUrlBinaryFile(Target, output)
StoreUrlBinaryFile(input, Target)
end syntax
syntax BeforeUrlTextFile is prefix operator with precedence 1
"before" "url" "file" <Target: Expression>
begin
StoreBeforeUrlTextFile(input, Target)
end syntax
syntax AfterUrlTextFile is prefix operator with precedence 1
"after" "url" "file" <Target: Expression>
begin
StoreAfterUrlTextFile(input, Target)
end syntax
syntax BeforeUrlBinaryFile is prefix operator with precedence 1
"before" "url" "binfile" <Target: Expression>
begin
StoreBeforeUrlBinaryFile(input, Target)
end syntax
syntax AfterUrlBinaryFile is prefix operator with precedence 1
"after" "url" "binfile" <Target: Expression>
begin
StoreAfterUrlBinaryFile(input, Target)
end syntax
--
end module