Skip to content

Commit

Permalink
HDF5 Operations
Browse files Browse the repository at this point in the history
Added Support for HDF5 Operations from HDF5 XOP.
  • Loading branch information
Matthias Kastner committed Apr 19, 2017
1 parent 6f4e30a commit cb359be
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions lib/rouge/lexers/igorpro.rb
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,16 @@ def self.igorOperation
)
end

def self.hdf5Operation
@hdf5Operation ||= Set.new %w(
hdf5createfile hdf5openfile hdf5closefile hdf5creategroup hdf5opengroup
hdf5listgroup hdf5closegroup hdf5listattributes hdf5attributeinfo hdf5datasetinfo
hdf5loaddata hdf5loadimage hdf5loadgroup hdf5savedata hdf5saveimage hdf5savegroup
hdf5typeinfo hdf5createlink hdf5unlinkobject hdf5libraryinfo
hdf5dumpstate hdf5dump hdf5dumperrors
)
end

def self.object_name
/[a-z][a-z0-9_]*\b/i
end
Expand Down Expand Up @@ -268,6 +278,9 @@ def self.object_name
elsif self.class.igorOperation.include? m[0].downcase
token Keyword::Reserved
push :operationFlags
elsif self.class.hdf5Operation.include? m[0].downcase
token Keyword::Reserved
push :operationFlags
elsif m[0].downcase.match /(v|s|w)_[a-z]+[a-z0-9]*/
token Name::Builtin
else
Expand All @@ -290,6 +303,8 @@ def self.object_name
token Punctuation, m[1] #i.e. ModuleFunctions
token Name, m[2]
end


end
end

Expand Down

0 comments on commit cb359be

Please sign in to comment.