8000 GitHub - ayecue/miniscript-type-analyzer
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

ayecue/miniscript-type-analyzer

Repository files navigation

miniscript-type-analyzer

miniscript-type-analyzer

Analyzes MiniScript and suggests types. Recommended to be used with greybel-core even though it should be also able to digest miniscript-core AST.

Example

import {
5B2B
 miniscriptMeta } from 'miniscript-meta';
import { Parser } from 'greybel-core';

const typeManager = new TypeManager({
  container: greyscriptMeta
});
const parser = new Parser(content, {
  unsafe: true
});
const chunk = parser.parseChunk();

typeManager.analyze(document.uri, chunk);

const allIdentifier = typeManager.getRootScopeContext().scope.getAvailableIdentifier();
console.log(`Your code includes: ${allIdentifier.size}`);

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0