Skip to content
This repository has been archived by the owner on Sep 5, 2023. It is now read-only.

Remove UncheckedBlockWriter #945

Merged
merged 2 commits into from
Feb 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/cairoWriter/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ import {
StructDefinitionWriter,
StructuredDocumentationWriter,
TupleExpressionWriter,
UncheckedBlockWriter,
VariableDeclarationStatementWriter,
VariableDeclarationWriter,
} from './writers';
Expand Down Expand Up @@ -150,7 +149,7 @@ export const CairoASTMapping = (ast: AST, throwOnUnimplemented: boolean) =>
[TryStatement, new NotImplementedWriter(ast, throwOnUnimplemented)],
[TupleExpression, new TupleExpressionWriter(ast, throwOnUnimplemented)],
[UnaryOperation, new NotImplementedWriter(ast, throwOnUnimplemented)],
[UncheckedBlock, new UncheckedBlockWriter(ast, throwOnUnimplemented)],
[UncheckedBlock, new BlockWriter(ast, throwOnUnimplemented)],
[UserDefinedTypeName, new NotImplementedWriter(ast, throwOnUnimplemented)],
[UsingForDirective, new NotImplementedWriter(ast, throwOnUnimplemented)],
[VariableDeclaration, new VariableDeclarationWriter(ast, throwOnUnimplemented)],
Expand Down
4 changes: 2 additions & 2 deletions src/cairoWriter/writers/blockWriter.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { ASTWriter, Block, SrcDesc } from 'solc-typed-ast';
import { ASTWriter, Block, UncheckedBlock, SrcDesc } from 'solc-typed-ast';
import { CairoASTNodeWriter } from '../base';
import { getDocumentation, INDENT } from '../utils';

export class BlockWriter extends CairoASTNodeWriter {
writeInner(node: Block, writer: ASTWriter): SrcDesc {
writeInner(node: Block | UncheckedBlock, writer: ASTWriter): SrcDesc {
const documentation = getDocumentation(node.documentation, writer);
return [
[
Expand Down
1 change: 0 additions & 1 deletion src/cairoWriter/writers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,5 @@ export * from './sourceUnitWriter';
export * from './structDefinitionWriter';
export * from './structuredDocumentationWriter';
export * from './tupleExpressionWriter';
export * from './uncheckedBlockWriter';
export * from './variableDeclarationStatementWriter';
export * from './variableDeclarationWriter';
23 changes: 0 additions & 23 deletions src/cairoWriter/writers/uncheckedBlockWriter.ts

This file was deleted.