Skip to content

Instantly share code, notes, and snippets.

View outsinre's full-sized avatar

Zachary Hu outsinre

View GitHub Profile
@outsinre
outsinre / call-graph.awk
Last active April 7, 2024 09:01 — forked from outro56/call-graph.awk
Parse lua code and print call graph
#!/usr/bin/awk -f
#
# call_graph.awk
#
# Usage:
# ./call_graph.awk my_program.lua | dot -Tsvg > call_graph.svg
#
# This is a script that generates a visual call graph for a Lua file.
# This script only shows calls made to functions defined within the
# input Lua file; that is, it excludes calls such as standard library