All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.shiftleft.semanticcpg.utils.MemberAccess.scala Maven / Gradle / Ivy

There is a newer version: 4.0.77
Show newest version
package io.shiftleft.semanticcpg.utils

import io.shiftleft.codepropertygraph.generated.Operators

object MemberAccess {

  /** For a given name, determine whether it is the name of a "member access" operation, e.g.,
    * ".memberAccess".
    */
  def isGenericMemberAccessName(name: String): Boolean = {
    (name == Operators.memberAccess) ||
    (name == Operators.indirectComputedMemberAccess) ||
    (name == Operators.indirectMemberAccess) ||
    (name == Operators.computedMemberAccess) ||
    (name == Operators.indirection) ||
    (name == Operators.addressOf) ||
    (name == Operators.fieldAccess) ||
    (name == Operators.indirectFieldAccess) ||
    (name == Operators.indexAccess) ||
    (name == Operators.indirectIndexAccess) ||
    (name == Operators.pointerShift) ||
    (name == Operators.getElementPtr)
  }

  def isFieldAccess(name: String): Boolean = {
    (name == Operators.memberAccess) ||
    (name == Operators.indirectComputedMemberAccess) ||
    (name == Operators.indirectMemberAccess) ||
    (name == Operators.computedMemberAccess) ||
    (name == Operators.indirection) ||
    (name == Operators.fieldAccess) ||
    (name == Operators.indirectFieldAccess) ||
    (name == Operators.indexAccess) ||
    (name == Operators.indirectIndexAccess) ||
    (name == Operators.getElementPtr)
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy