summaryrefslogtreecommitdiff
path: root/script-beta/vm/getLinks.lua
blob: b034fd249f93303e36eebda25b99d737d9ad0213 (plain)
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
local guide = require 'parser.guide'
local vm    = require 'vm.vm'
local files = require 'files'

local function getFileLinks(uri)
    
end

local function getLinksTo(uri)

end

function vm.getLinksTo(uri)
    local cache = vm.getCache('getLinksTo')[uri]
    if cache ~= nil then
        return cache
    end
    cache = getLinksTo(uri)
    vm.getCache('getLinksTo')[uri] = cache
    return cache
end

function vm.getFileLinks(uri)
    local cache = vm.getCache('getFileLinks')[uri]
    if cache ~= nil then
        return cache
    end
    cache = getFileLinks(uri)
    vm.getCache('getFileLinks')[uri] = cache
    return cache
end