|
|
@ -6,6 +6,7 @@ import { ConfigurationSettings } from '@remix-project/remix-lib' |
|
|
|
import { checkSpecialChars, CustomTooltip, extractNameFromKey } from '@remix-ui/helper' |
|
|
|
import { checkSpecialChars, CustomTooltip, extractNameFromKey } from '@remix-ui/helper' |
|
|
|
import { canUseWorker, baseURLBin, baseURLWasm, urlFromVersion, pathToURL } from '@remix-project/remix-solidity' |
|
|
|
import { canUseWorker, baseURLBin, baseURLWasm, urlFromVersion, pathToURL } from '@remix-project/remix-solidity' |
|
|
|
import { convertAST2UmlClasses } from 'sol2uml/lib/converterAST2Classes' |
|
|
|
import { convertAST2UmlClasses } from 'sol2uml/lib/converterAST2Classes' |
|
|
|
|
|
|
|
import parser from '@solidity-parser/parser' |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import { compilerReducer, compilerInitialState } from './reducers/compiler' |
|
|
|
import { compilerReducer, compilerInitialState } from './reducers/compiler' |
|
|
@ -741,11 +742,11 @@ export const CompilerContainer = (props: CompilerContainerProps) => { |
|
|
|
const payload = api.getCompilationResult() |
|
|
|
const payload = api.getCompilationResult() |
|
|
|
const currentFile = api.currentFile |
|
|
|
const currentFile = api.currentFile |
|
|
|
const sourceCode = payload.source.sources[currentFile].content |
|
|
|
const sourceCode = payload.source.sources[currentFile].content |
|
|
|
const ast = payload.data.sources[currentFile].ast |
|
|
|
const ast = parser.parse(sourceCode) |
|
|
|
console.log({ ast }) |
|
|
|
console.log({ ast }) |
|
|
|
try { |
|
|
|
try { |
|
|
|
const result = await convertAST2UmlClasses(ast, ast.absolutePath) |
|
|
|
// const result = await convertAST2UmlClasses(ast, currentFile)
|
|
|
|
console.log({ result }) |
|
|
|
// console.log({ result })
|
|
|
|
} catch (error) { |
|
|
|
} catch (error) { |
|
|
|
console.log({ error }) |
|
|
|
console.log({ error }) |
|
|
|
console.log({ payload }) |
|
|
|
console.log({ payload }) |
|
|
|