Skip to content

Commit b8f9c09

Browse files
committed
Merge branch 'master' into patch
2 parents 649cc2e + 6d93a77 commit b8f9c09

File tree

10 files changed

+461
-33
lines changed

10 files changed

+461
-33
lines changed

.gitignore

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,18 @@
11
*.jl.cov
2+
*.jl.*.cov
23
*.jl.mem
4+
5+
.DS_Store
6+
7+
docs/build/
8+
docs/site/
9+
10+
docs/Manifest.toml
11+
12+
*.ipynb_checkpoints
13+
**/*.ipynb_checkpoints
14+
**/**/*.ipynb_checkpoints
15+
16+
_*.dat
17+
*.swp
18+
__pycache__/

.travis.yml

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,28 @@ os:
44
- osx
55
julia:
66
- 0.6
7+
- 1.0
78
- nightly
89
matrix:
910
allow_failures:
1011
- julia: nightly
1112
notifications:
1213
email: false
13-
# uncomment the following lines to override the default test script
14-
#script:
15-
# - if [[ -a .git/shallow ]]; then git fetch --unshallow; fi
16-
# - julia --check-bounds=yes -e 'Pkg.clone(pwd()); Pkg.build("MacroTools"); Pkg.test("MacroTools"; coverage=true)'
14+
15+
env:
16+
global:
17+
- DOCUMENTER_DEBUG=true
18+
19+
jobs:
20+
include:
21+
- stage: "Documentation"
22+
julia: 1.0
23+
os: linux
24+
script:
25+
- julia --project=docs/ -e 'using Pkg; Pkg.instantiate(); Pkg.add(PackageSpec(path=pwd()))'
26+
- julia --project=docs/ docs/make.jl
27+
after_success: skip
28+
29+
# uncomment this to enable test coverage
30+
# after_success:
31+
# - julia -e 'import Pkg; cd(Pkg.dir("Luxor")); Pkg.add("Coverage"); using Coverage; Codecov.submit(process_folder())'

Manifest.toml

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
# This file is machine-generated - editing it directly is not advised
2+
3+
[[Base64]]
4+
uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"
5+
6+
[[Compat]]
7+
deps = ["Base64", "Dates", "DelimitedFiles", "Distributed", "InteractiveUtils", "LibGit2", "Libdl", "LinearAlgebra", "Markdown", "Mmap", "Pkg", "Printf", "REPL", "Random", "Serialization", "SharedArrays", "Sockets", "SparseArrays", "Statistics", "Test", "UUIDs", "Unicode"]
8+
git-tree-sha1 = "49269e311ffe11ac5b334681d212329002a9832a"
9+
uuid = "34da2185-b29b-5c13-b0c7-acf172513d20"
10+
version = "1.5.1"
11+
12+
[[Dates]]
13+
deps = ["Printf"]
14+
uuid = "ade2ca70-3891-5945-98fb-dc099432e06a"
15+
16+
[[DelimitedFiles]]
17+
deps = ["Mmap"]
18+
uuid = "8bb1440f-4735-579b-a4ab-409b98df4dab"
19+
20+
[[Distributed]]
21+
deps = ["Random", "Serialization", "Sockets"]
22+
uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b"
23+
24+
[[InteractiveUtils]]
25+
deps = ["Markdown"]
26+
uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
27+
28+
[[LibGit2]]
29+
uuid = "76f85450-5226-5b5a-8eaa-529ad045b433"
30+
31+
[[Libdl]]
32+
uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
33+
34+
[[LinearAlgebra]]
35+
deps = ["Libdl"]
36+
uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
37+
38+
[[Logging]]
39+
uuid = "56ddb016-857b-54e1-b83d-db4d58db5568"
40+
41+
[[Markdown]]
42+
deps = ["Base64"]
43+
uuid = "d6f4376e-aef5-505a-96c1-9c027394607a"
44+
45+
[[Mmap]]
46+
uuid = "a63ad114-7e13-5084-954f-fe012c677804"
47+
48+
[[Pkg]]
49+
deps = ["Dates", "LibGit2", "Markdown", "Printf", "REPL", "Random", "SHA", "UUIDs"]
50+
uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
51+
52+
[[Printf]]
53+
deps = ["Unicode"]
54+
uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7"
55+
56+
[[REPL]]
57+
deps = ["InteractiveUtils", "Markdown", "Sockets"]
58+
uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb"
59+
60+
[[Random]]
61+
deps = ["Serialization"]
62+
uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
63+
64+
[[SHA]]
65+
uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce"
66+
67+
[[Serialization]]
68+
uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b"
69+
70+
[[SharedArrays]]
71+
deps = ["Distributed", "Mmap", "Random", "Serialization"]
72+
uuid = "1a1011a3-84de-559e-8e89-a11a2f7dc383"
73+
74+
[[Sockets]]
75+
uuid = "6462fe0b-24de-5631-8697-dd941f90decc"
76+
77+
[[SparseArrays]]
78+
deps = ["LinearAlgebra", "Random"]
79+
uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
80+
81+
[[Statistics]]
82+
deps = ["LinearAlgebra", "SparseArrays"]
83+
uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
84+
85+
[[Test]]
86+
deps = ["Distributed", "InteractiveUtils", "Logging", "Random"]
87+
uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
88+
89+
[[UUIDs]]
90+
deps = ["Random", "SHA"]
91+
uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"
92+
93+
[[Unicode]]
94+
uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5"

Project.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
name = "MacroTools"
2+
uuid = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09"
3+
4+
[deps]
5+
Compat = "34da2185-b29b-5c13-b0c7-acf172513d20"

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ have a type definition:
1313

1414
```julia
1515
ex = quote
16-
type Foo
16+
struct Foo
1717
x::Int
1818
y
1919
end
@@ -23,7 +23,7 @@ end
2323
If you know what you're doing, you can pull out the name and fields via:
2424

2525
```julia
26-
julia> if isexpr(ex.args[2], :type)
26+
julia> if isexpr(ex.args[2], :struct)
2727
(ex.args[2].args[2], ex.args[2].args[3].args)
2828
end
2929
(:Foo,{:( # line 3:),:(x::Int),:( # line 4:),:y})
@@ -40,7 +40,7 @@ Enter MacroTools:
4040
```julia
4141
julia> using MacroTools
4242

43-
julia> @capture(ex, type T_ fields__ end)
43+
julia> @capture(ex, struct T_ fields__ end)
4444
true
4545

4646
julia> T, fields
@@ -91,12 +91,12 @@ Another common use case is to catch symbol literals, e.g.
9191
9292
```julia
9393
@capture(ex,
94-
type T_Symbol
94+
struct T_Symbol
9595
fields__
9696
end)
9797
```
9898
99-
which will match e.g. `type Foo ...` but not `type Foo{V} ...`
99+
which will match e.g. `struct Foo ...` but not `struct Foo{V} ...`
100100
101101
### Unions
102102

docs/Project.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[deps]
2+
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
3+
MacroTools = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09"
4+
5+
[compat]
6+
Documenter = "~0.19"

docs/make.jl

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
using Documenter, MacroTools
2+
3+
makedocs(
4+
modules = [MacroTools],
5+
format = :html,
6+
sitename = "MacroTools",
7+
pages = Any[
8+
"Introduction to MacroTools" => "index.md"
9+
],
10+
# Use clean URLs, unless built as a "local" build
11+
html_prettyurls = !("local" in ARGS),
12+
# html_canonical = "https://juliadocs.github.io/Documenter.jl/latest/",
13+
)
14+
15+
deploydocs(
16+
repo = "[email protected]:MikeInnes/MacroTools.jl.git",
17+
target = "build",
18+
julia = "1.0",
19+
osname = "linux",
20+
deps = nothing,
21+
make = nothing,
22+
)

0 commit comments

Comments
 (0)