-
Notifications
You must be signed in to change notification settings - Fork 0
/
types-extract.jl
executable file
·61 lines (53 loc) · 1.56 KB
/
types-extract.jl
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
#!/usr/bin/env julia
#######################################################################
# TODO
###############################
#
# $
#
# FIXME: reload parameter is not supported
#######################################################################
#--------------------------------------------------
# Imports
#--------------------------------------------------
using JuliaSub
using ArgParse
#--------------------------------------------------
# Command line arguments
#--------------------------------------------------
# → Dict (arguments)
function parse_command_line_args()
argsStr = ArgParseSettings(
description = "Collects type annotations from Julia source files"
)
@add_arg_table! argsStr begin
"pkgs"
help = "directory with Julia packages"
arg_type = String
required = true
"dest"
help = "directory for outputting CSV files with extracted type annotations"
arg_type = String
required = true
#=
"--reload", "-r"
help = "flag specifying if packages information must be reloaded"
action = :store_true
=#
end
parse_args(argsStr)
end
# All script parameters
const PARAMS = parse_command_line_args()
#--------------------------------------------------
# Main
#--------------------------------------------------
println("Initiating type annotations collection...")
result = collectAndSaveTypeInfo2CSV(
PARAMS["pkgs"], PARAMS["dest"]
)
for (k, v) in result
println(k)
println(v)
println("\n")
end