FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
flashdevelop/External/Tools/AS2API/documenter.rb at development · SandersAlex/flashdevelop · GitHub
SandersAlex
flashdevelop
Repository navigation
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
flashdevelop
/
External
/
Tools
/
AS2API
/
documenter.rb
Copy path
More file actions
More file actions
Latest commit
History
History
History
49 lines (37 loc) · 985 Bytes
Breadcrumbs
flashdevelop
/
External
/
Tools
/
AS2API
/
documenter.rb
Copy path
File metadata and controls
49 lines (37 loc) · 985 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
require
'find'
require
'parse/lexer'
# TODO: remove this requirement
require
'parse/as_io'
require
'api_loader'
class
NullProgressListener
def
parsing_sources
(
total_files
)
yield
end
def
parse_source
(
file_number
,
file_name
)
end
def
generating_pages
(
total_pages
)
yield
end
def
generate_page
(
file_number
,
file_name
)
end
end
BOM
=
"
\357
\273
\277
"
# Look for a byte-order-marker in the first 3 bytes of io.
# Eats the BOM and returns true on finding one; rewinds the stream to its
# start and returns false if none is found.
def
detect_bom?
(
io
)
return
true
if
io
.
read
(
3
)
==
BOM
io
.
seek
(
0
)
false
end
# lists the .as files in 'path', and it's subdirectories
def
each_source
(
path
)
path
=
path
.
sub
(
/
\/
+$/
,
""
)
Find
.
find
(
path
)
do
|
f
|
base
=
File
.
basename
(
f
)
# Ignore anything named 'CVS', or starting with a dot
Find
.
prune
if
base
=~
/^
\.
/
||
base
==
"CVS"
if
base
=~
/
\.
as$/
yield
f
[
path
.
length
+
1
,
f
.
length
]
end
end
end
Back
|
FazBrowse Home
|
New Git URL