From 46bd62870d5b591b013b52e4633ee10c9391046c Mon Sep 17 00:00:00 2001 From: gluax Date: Tue, 3 May 2022 09:53:46 -0700 Subject: [PATCH] remove missed access file --- compiler/ast/src/accesses/static_access.rs | 54 ---------------------- 1 file changed, 54 deletions(-) delete mode 100644 compiler/ast/src/accesses/static_access.rs diff --git a/compiler/ast/src/accesses/static_access.rs b/compiler/ast/src/accesses/static_access.rs deleted file mode 100644 index 5d3455e002..0000000000 --- a/compiler/ast/src/accesses/static_access.rs +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (C) 2019-2022 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use crate::{Expression, Identifier, Node, Type}; - -use leo_span::Span; - -use serde::{Deserialize, Serialize}; -use std::{cell::RefCell, fmt}; - -/// An access expression to a static member, e.g., a constant in a circuit. -/// An example would be `Foo::Const` or `Foo::function` in `Foo::function()`. -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct StaticAccess { - /// Represents the container for the static member to access. - /// Usually this is a circuit. - pub inner: Box, - /// The static member in `inner` that is being accessed. - pub name: Identifier, - /// A refcell type initially (), it is later assigned during type checking if necessary. - // FIXME(Centril): Shouldn't be in an AST. Remove it as part of an architectural revamp. - pub type_: RefCell, - /// The span for the entire expression `inner::name`. - pub span: Span, -} - -impl fmt::Display for StaticAccess { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "{}::{}", self.inner, self.name) - } -} - -impl Node for StaticAccess { - fn span(&self) -> &Span { - &self.span - } - - fn set_span(&mut self, span: Span) { - self.span = span; - } -}