Skip to content

Commit

Permalink
Squashed 'packages/LoweredCodeUtils/' content from commit 1af0a400
Browse files Browse the repository at this point in the history
git-subtree-dir: packages/LoweredCodeUtils
git-subtree-split: 1af0a400b95abbeff7f01ba396abfa3d1cafb456
  • Loading branch information
davidanthoff committed Jan 17, 2023
0 parents commit 6febb62
Show file tree
Hide file tree
Showing 22 changed files with 3,597 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: CI
on:
pull_request:
push:
branches:
- master
tags: '*'
jobs:
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
version:
- '1.6' # current LTS
- '1' # latest stable
- 'nightly'
os:
- ubuntu-latest
- macOS-latest
- windows-latest
arch:
- x64
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: actions/cache@v1
env:
cache-name: cache-artifacts
with:
path: ~/.julia/artifacts
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
restore-keys: |
${{ runner.os }}-test-${{ env.cache-name }}-
${{ runner.os }}-test-
${{ runner.os }}-
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v1
with:
file: lcov.info
18 changes: 18 additions & 0 deletions .github/workflows/Documenter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Documenter
on:
push:
branches: [master]
tags: [v*]
pull_request:

jobs:
Documenter:
name: Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: julia-actions/julia-buildpkg@latest
- uses: julia-actions/julia-docdeploy@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
15 changes: 15 additions & 0 deletions .github/workflows/TagBot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: TagBot
on:
issue_comment:
types:
- created
workflow_dispatch:
jobs:
TagBot:
if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot'
runs-on: ubuntu-latest
steps:
- uses: JuliaRegistries/TagBot@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
ssh: ${{ secrets.DOCUMENTER_KEY }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.DS_Store
/Manifest.toml
19 changes: 19 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Copyright (c) 2019 Tim Holy

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
20 changes: 20 additions & 0 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name = "LoweredCodeUtils"
uuid = "6f1432cf-f94c-5a45-995e-cdbf5db27b0b"
authors = ["Tim Holy <tim.holy@gmail.com>"]
version = "2.3.0"

[deps]
JuliaInterpreter = "aa1ae85d-cabe-5617-a682-6adf51b2e16a"

[compat]
JuliaInterpreter = "0.9"
julia = "1.6"

[extras]
InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
Parameters = "d96e819e-fc66-5662-9728-84c9c7592b0a"
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["InteractiveUtils", "Parameters", "Pkg", "Test"]
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# LoweredCodeUtils

[![](https://img.shields.io/badge/docs-stable-blue.svg)](https://JuliaDebug.github.io/LoweredCodeUtils.jl/stable)

This package performs operations on Julia's [lowered AST](https://docs.julialang.org/en/latest/devdocs/ast/). See the documentation for details.
2 changes: 2 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
build/
site/
5 changes: 5 additions & 0 deletions docs/Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[deps]
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"

[compat]
Documenter = "0.24"
14 changes: 14 additions & 0 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using Documenter
using LoweredCodeUtils

makedocs(
sitename = "LoweredCodeUtils",
format = Documenter.HTML(prettyurls = get(ENV, "CI", nothing) == "true"),
modules = [LoweredCodeUtils],
pages = ["Home" => "index.md", "signatures.md", "edges.md", "api.md"]
)

deploydocs(
repo = "github.com/JuliaDebug/LoweredCodeUtils.jl.git",
push_preview = true
)
35 changes: 35 additions & 0 deletions docs/src/api.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# API

## Signatures

```@docs
signature
methoddef!
rename_framemethods!
bodymethod
```

## Edges

```@docs
CodeEdges
lines_required
lines_required!
selective_eval!
selective_eval_fromstart!
```

## Internal utilities

```@docs
LoweredCodeUtils.print_with_code
LoweredCodeUtils.next_or_nothing
LoweredCodeUtils.skip_until
LoweredCodeUtils.MethodInfo
LoweredCodeUtils.identify_framemethod_calls
LoweredCodeUtils.iscallto
LoweredCodeUtils.getcallee
LoweredCodeUtils.find_name_caller_sig
LoweredCodeUtils.replacename!
LoweredCodeUtils.Variable
```
Loading

0 comments on commit 6febb62

Please sign in to comment.