mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
ast: minor cleanup of commented struct Field (#13231)
This commit is contained in:
parent
05ff8f516d
commit
ffb263c2e1
@ -275,15 +275,13 @@ pub mut:
|
||||
typ Type
|
||||
}
|
||||
|
||||
/*
|
||||
pub struct Field {
|
||||
pub:
|
||||
name string
|
||||
pos token.Position
|
||||
pub mut:
|
||||
typ Type
|
||||
pub fn (f &StructField) equals(o &StructField) bool {
|
||||
// TODO: f.is_mut == o.is_mut was removed here to allow read only access
|
||||
// to (mut/not mut), but otherwise equal fields; some other new checks are needed:
|
||||
// - if node is declared mut, and we mutate node.stmts, all stmts fields must be mutable
|
||||
// - same goes for pub and global, if we call the field from another module
|
||||
return f.name == o.name && f.typ == o.typ && f.is_pub == o.is_pub && f.is_global == o.is_global
|
||||
}
|
||||
*/
|
||||
|
||||
// const field in const declaration group
|
||||
pub struct ConstField {
|
||||
|
@ -922,31 +922,6 @@ pub:
|
||||
types []Type
|
||||
}
|
||||
|
||||
/*
|
||||
pub struct Field {
|
||||
pub:
|
||||
name string
|
||||
pub mut:
|
||||
typ Type
|
||||
default_expr Expr
|
||||
has_default_expr bool
|
||||
default_expr_typ Type
|
||||
default_val string
|
||||
attrs []Attr
|
||||
is_pub bool
|
||||
is_mut bool
|
||||
is_global bool
|
||||
}
|
||||
*/
|
||||
|
||||
pub fn (f &StructField) equals(o &StructField) bool {
|
||||
// TODO: f.is_mut == o.is_mut was removed here to allow read only access
|
||||
// to (mut/not mut), but otherwise equal fields; some other new checks are needed:
|
||||
// - if node is declared mut, and we mutate node.stmts, all stmts fields must be mutable
|
||||
// - same goes for pub and global, if we call the field from another module
|
||||
return f.name == o.name && f.typ == o.typ && f.is_pub == o.is_pub && f.is_global == o.is_global
|
||||
}
|
||||
|
||||
pub struct Array {
|
||||
pub:
|
||||
nr_dims int
|
||||
|
Loading…
Reference in New Issue
Block a user