2023-01-16 22:26:34 +00:00
ace . define ( "ace/mode/mel_highlight_rules" , [ "require" , "exports" , "module" , "ace/lib/oop" , "ace/mode/text_highlight_rules" ] , function ( require , exports , module ) { /* THIS FILE WAS AUTOGENERATED FROM MEL.tmLanguage (UUID: 69554E52-391D-42BC-9F65-7A77444BA1CF) */
2014-07-08 20:15:22 +00:00
"use strict" ;
2013-12-30 15:00:16 +00:00
var oop = require ( "../lib/oop" ) ;
var TextHighlightRules = require ( "./text_highlight_rules" ) . TextHighlightRules ;
2023-01-16 22:26:34 +00:00
var MELHighlightRules = function ( ) {
this . $rules = { start : [ { caseInsensitive : true ,
token : 'storage.type.mel' ,
regex : '\\b(matrix|string|vector|float|int|void)\\b' } ,
{ caseInsensitive : true ,
token : 'support.function.mel' ,
regex : ' \ \ b ( ( s ( h ( ow ( ManipCtx | S ( hadingGroupAttrEditor | electionInTitle ) | H ( idden | elp ) | Window ) | el ( f ( Button | TabLayout | Layout ) | lField ) | ading ( GeometryRelCtx | Node | Connection | LightRelCtx ) ) | y ( s ( tem | File ) | mbol ( Button | CheckBox ) ) | nap ( shot | Mode | 2 to2 | TogetherCtx | Key ) | c ( ulpt | ene ( UIReplacement | Editor ) | ale ( BrushBrightness | Constraint | Key ( Ctx ) ? ) ? | r ( ipt ( Node | Ctx | Table | edPanel ( Type ) ? | Job | EditorInfo ) | oll ( Field | Layout ) ) | mh ) | t ( itch ( Surface ( Points ) ? | AndExplodeShell ) | a ( ckTrace | rt ( sWith | String ) ) | r ( cmp | i ( ng ( ToStringArray | Array ( Remove ( Duplicates | ) | C ( ount | atenate ) | ToString | Intersector ) ) | p ) | oke ) ) | i ( n ( gleProfileBirailSurface ) ? | ze | gn | mplify ) | o ( u ( nd ( Control ) ? | rce ) | ft ( Mod ( Ctx ) ? ) ? | rt ) | u ( perCtx | rface ( S ( haderList | ampler ) ) ? | b ( st ( itute ( Geometry | AllString ) ? | ring ) | d ( M ( irror | a ( tchTopology | p ( SewMove | Cut ) ) ) | iv ( Crease | DisplaySmoothness ) ? | C ( ollapse | leanTopology ) | T ( o ( Blind | Poly ) | ransferUVsToCache ) | DuplicateAndConnect | EditUV | ListComponentConversion | AutoProjection ) ) ) | p ( h ( ere | rand ) | otLight ( PreviewPort ) ? | aceLocator | r ( ing | eadSheetEditor ) ) | e ( t ( s | MenuMode | Sta ( te | rtupMessage | mpDensity ) | NodeTypeFlag | ConstraintRestPosition | ToolTo | In ( putDeviceMapping | finity ) | D ( ynamic | efaultShadingGroup | rivenKeyframe ) | UITemplate | P ( ar ( ticleAttr | ent ) | roject ) | E ( scapeCtx | dit ( or | Ctx ) ) | Key ( Ctx | frame | Path ) | F ( ocus | luidAttr ) | Attr ( Mapping ) ? ) | parator | ed | l ( ect ( Mode | ionConnection | Context | Type | edNodes | Pr ( iority | ef ) | Key ( Ctx ) ? ) ? | LoadSettings ) | archPathArray ) | kin ( Cluster | Percent ) | q ( uareSurface | rt ) | w ( itchTable | atchDisplayPort ) | a ( ve ( Menu | Shelf | ToolSettings | I ( nitialState | mage ) | Pref ( s | Objects ) | Fluid | A ( ttrPreset | llShelves ) ) | mpleImage ) | rtContext | mooth ( step | Curve | TangentSurface ) ) | h ( sv _to _rgb | yp ( ot | er ( Graph | Shade | Panel ) ) | i ( tTest | de | lite ) | ot ( Box | key ( Check ) ? ) | ud ( Button | Slider ( Button ) ? ) | e ( lp ( Line ) ? | adsUpDisplay | rmite ) | wRe ( nder ( Load ) ? | flectionMap ) | ard ( enPointCurve | ware ( RenderPanel ) ? ) ) | n ( o ( nLinear | ise | de ( Type | IconButton | Outliner | Preset ) | rmal ( ize | Constraint ) ) | urbs ( Boolean | S ( elect | quare ) | C ( opyUVSet | ube ) | To ( Subdiv | Poly ( gonsPref ) ? ) | Plane | ViewDirectionVector ) | ew ( ton | PanelItems ) | ame ( space ( Info ) ? | Command | Field ) ) | c ( h ( oice | dir | eck ( Box ( Grp ) ? | DefaultRenderGlobals ) | a ( n ( nelBox | geSubdiv ( Region | ComponentDisplayLevel ) ) | racter ( Map | OutlineEditor ) ? ) ) | y ( cleCheck | linder ) | tx ( Completion | Traverse | EditMode | Abort ) | irc ( ularFillet | le ) | o ( s | n ( str ( uctionHistory | ain ( Value ) ? ) | nect ( ionInfo | Control | Dynamic | Joint | Attr ) | t ( extInfo | rol ) | dition | e | vert ( SolidTx | Tessellation | Unit | FromOldLayers | Lightmap ) | firmDialog ) | py ( SkinWeights | Key | Flexor | Array ) | l ( or ( Slider ( Grp | ButtonGrp ) | Index ( SliderGrp ) ? | Editor | AtPoint ) ? | umnLayout | lision ) | arsenSubdivSelectionList | m ( p ( onentEditor | utePolysetVolume | actHairSystem ) | mand ( Port | Echo | Line ) ) ) | u ( tKey | r ( ve ( MoveEPCtx | SketchCtx | CVCtx | Intersect | OnSurface | E ( ditorCtx | PCtx ) | AddPtCtx ) ? | rent ( Ctx | Time ( Ctx ) ? | Unit ) ) ) | p ( GetSolverAttr | Button | S ( olver ( Types ) ? | e ( t ( SolverAttr | Edit ) | am ) ) | C ( o ( nstraint | llision ) | ache ) | Tool | P ( anel | roperty ) ) | eil | l ( ip ( Schedule ( rOutliner ) ? | TrimBefore | Editor ( CurrentTimeCtx ) ? ) ? | ose ( Surface | Curve ) | uster | ear ( Cache ) ? | amp ) | a ( n ( CreateManip | vas ) | tch ( Quiet ) ? | pitalizeString | mera ( View ) ? ) | r ( oss ( Product ) ? | eate ( RenderLayer | MotionField | SubdivRegion | N ( ode | ewShelf ) | D ( isplayLayer | rawCtx ) | Editor ) ) | md ( Shell | FileOutput ) ) | M ( R ( ender ( ShadowData | Callback | Data | Util | View | Line ( Array ) ? ) | ampAttribute ) | G ( eometryData | lobal ) | M ( odelMessage | essage | a ( nipData | t ( erial | rix ) ) ) | BoundingBox | S ( yntax | ceneMessage | t ( atus | ring ( Array ) ? ) | imple | pace | elect ( ion ( Mask | List ) | Info ) | watchRender ( Register | Base ) ) | H ( ardwareRenderer | WShaderSwatchGenerator ) | NodeMessage | C ( o ( nditionMessage | lor ( Array ) ? | m ( putation | mand ( Result | Message ) ) ) | ursor | loth ( Material | S ( ystem | olverRegister ) | Con ( straint | trol ) | Triangle | Particle | Edge | Force ) | allbackIdArray ) | T ( ypeId | ime ( r ( Message ) ? | Array ) ? | oolsInfo | esselationParams | r ( imBoundaryArray | ansformationMatrix ) ) | I ( ntArray | t ( Geometry | Mesh ( Polygon | Edge | Vertex | FaceVertex ) | S ( urfaceCV | electionList ) | CurveCV | Instancer | eratorType | D ( ependency ( Graph | Nodes ) | ag ) | Keyframe ) | k ( System | HandleGroup ) | mage ) | 3 dView | Object ( SetMessage | Handle | Array ) ? | D ( G ( M ( odifier | essage ) | Context ) | ynSwept ( Triangle | Line ) | istance | oubleArray | evice ( State | Channel ) | a ( ta ( Block |
{ caseInsensitive : true ,
token : 'support.constant.mel' ,
regex : ' \ \ b ( s ( h ( ellTessellate | a ( d ( ing ( Map | Engine ) | erGlow ) | pe ) ) | n ( ow | apshot ( Shape ) ? ) | c ( ulpt | aleConstraint | ript ) | t ( yleCurve | itch ( Srf | AsNurbsShell ) | u ( cco | dioClearCoat ) | encil | roke ( Globals ) ? ) | i ( ngleShadingSwitch | mpleVolumeShader ) | o ( ftMod ( Manip | Handle ) ? | lidFractal ) | u ( rface ( Sha ( der | pe ) | Info | EdManip | VarGroup | Luminance ) | b ( Surface | d ( M ( odifier ( UV | World ) ? | ap ( SewMove | Cut | pingManip ) ) | B ( lindData | ase ) | iv ( ReverseFaces | SurfaceVarGroup | Co ( llapse | mponentId ) | To ( Nurbs | Poly ) ) ? | HierBlind | CleanTopology | Tweak ( UV ) ? | P ( lanarProj | rojManip ) | LayoutUV | A ( ddTopology | utoProj ) ) | Curve ) ) | p ( BirailSrf | otLight | ring ) | e ( tRange | lectionListOperator ) | k ( inCluster | etchPlane ) | quareSrf | ampler ( Info ) ? | m ( ooth ( Curve | TangentSrf ) | ear ) ) | h ( svToRgb | yper ( GraphInfo | View | Layout ) | ik ( Solver | Handle | Effector ) | oldMatrix | eightField | w ( Re ( nderGlobals | flectionMap ) | Shader ) | a ( ir ( System | Constraint | TubeShader ) | rd ( enPoint | wareRenderGlobals ) ) ) | n ( o ( n ( ExtendedLightShapeNode | Linear | AmbientLightShapeNode ) | ise | rmalConstraint ) | urbs ( Surface | Curve | T ( oSubdiv ( Proc ) ? | essellate ) | DimShape ) | e ( twork | wtonField ) ) | c ( h ( o ( ice | oser ) | ecker | aracter ( Map | Offset ) ? ) | o ( n ( straint | tr ( olPoint | ast ) | dition ) | py ( ColorSet | UVSet ) ) | urve ( Range | Shape | Normalizer ( Linear | Angle ) ? | In ( tersect | fo ) | VarGroup | From ( Mesh ( CoM | Edge ) ? | Su ( rface ( Bnd | CoS | Iso ) ? | bdiv ( Edge | Face ) ? ) ) ) | l ( ip ( Scheduler | Library ) | o ( se ( stPointOnSurface | Surface | Curve ) | th | ud ) | uster ( Handle ) ? | amp ) | amera ( View ) ? | r ( eate ( BPManip | ColorSet | UVSet ) | ater ) ) | t ( ime ( ToUnitConversion | Function ) ? | oo ( nLineAttributes | lDrawManip ) | urbulenceField | ex ( BaseDeformManip | ture ( BakeSet | 2 d | ToGeom | 3 d | Env ) | SmudgeUVManip | LatticeDeformManip ) | weak | angentConstraint | r ( i ( pleShadingSwitch | m ( WithBoundaries ) ? ) | ansform ( Geometry ) ? ) ) | i ( n ( s ( tancer | ertKnot ( Surface | Curve ) ) | tersectSurface ) | k ( RPsolver | MCsolver | S ( ystem | olver | Csolver | plineSolver ) | Handle | PASolver | Effector ) | m ( plicit ( Box | Sphere | Cone ) | agePlane ) ) | o ( cean ( Shader ) ? | pticalFX | ffset ( Surface | C ( os | urve ) ) | ldBlindDataBase | rient ( Constraint | ationMarker ) | bject ( RenderFilter | MultiFilter | BinFilter | S ( criptFilter | et ) | NameFilter | TypeFilter | Filter | AttrFilter ) ) | d ( yn ( Globals | Base ) | i ( s ( tance ( Between | DimShape ) | pla ( yLayer ( Manager ) ? | cementShader ) | kCache ) | rect ( ionalLight | edDisc ) | mensionShape ) | o ( ubleShadingSwitch | f ) | pBirailSrf | e ( tach ( Surface | Curve ) | pendNode | f ( orm ( Bend | S ( ine | quash ) | Twist | ableShape | F ( unc | lare ) | Wave ) | ault ( RenderUtilityList | ShaderList | TextureList | LightList ) ) | lete ( Co ( lorSet | mponent ) | UVSet ) ) | ag ( Node | Pose ) | r ( opoffLocator | agField ) ) | u ( seBackground | n ( trim | i ( t ( Conversion | ToTimeConversion ) | formField ) | known ( Transform | Dag ) ? ) | vChooser ) | j ( iggle | oint ( Cluster | Ffd | Lattice ) ? ) | p ( sdFileTex | hong ( E ) ? | o ( s ( tProcessList | itionMarker ) | int ( MatrixMult | Constraint | On ( SurfaceInfo | CurveInfo ) | Emitter | Light ) | l ( y ( Reduce | M ( irror | o ( difier ( UV | World ) ? | ve ( UV | Edge | Vertex | Face ( tUV ) ? ) ) | erge ( UV | Edge | Vert | Face ) | ap ( Sew ( Move ) ? | Cut | Del ) ) | B ( oolOp | evel | lindData | ase ) | S ( traightenUVBorder | oftEdge | ubd ( Edge | Face ) | p ( h ( ere | Proj ) | lit ( Ring | Edge | Vert ) ? ) | e ( parate | wEdge ) | mooth ( Proxy | Face ) ? ) | Normal ( izeUV | PerVertex ) ? | C ( hipOff | yl ( inder | Proj ) | o ( ne | pyUV | l ( orPerVertex | lapse ( Edge | F ) ) ) | u ( t ( Manip ( Container ) ? ) ? | be ) | loseBorder | rea ( seEdge | t ( or | eFace ) ) ) | T ( o ( Subdiv | rus ) | weak ( UV ) ? | r ( iangulate | ansfer ) ) | OptUvs | D ( uplicateEdge | el ( Edge | Vertex | Facet ) ) | Unite | P ( yramid | oke ( Manip ) ? | lan ( e | arProj ) | r ( i ( sm | mitive ) | oj ) ) | Extrude ( Edge | Vertex | Face ) | VertexNormalManip | Quad | Flip ( UV | Edge ) | WedgeFace | LayoutUV | A ( utoProj | ppend ( Vertex ) ? | verageVertex ) ) | eVectorConstraint ) ) | fx ( Geometry | Hair | Toon ) | l ( usMinusAverage | a ( n ( e | arTrimSurface ) | ce ( 2 dTexture | 3 dTexture ) ) ) | a ( ssMatrix | irBlend | r ( ti ( cle ( SamplerInfo | C ( olorMapper | loud ) | TranspMapper | IncandMapper | AgeMapper ) ? | tion ) | ent ( Constraint | Tessellate ) | amDimension ) ) | r ( imitive | o ( ject ( ion | Curve | Tangent ) | xyManager ) ) ) | e ( n ( tity | v ( Ball | ironmentFog | S ( phere | ky ) | C ( hrome | ube ) | Fog ) ) | x ( t ( end ( Surface | Curve ) | rude ) | p ( lodeNurbsShell | ression ) ) ) | v ( iewManip | o ( lume ( Shader | Noise | Fog | Light | AxisField ) | rtexField ) | e ( ctor ( RenderGlobals | Product ) | rtexBakeSet ) ) | quadShadingSwitch | f ( i ( tBspline | eld | l ( ter ( Resample | Simplify | ClosestSample | Euler ) ? | e | letCurve ) ) | o ( urByFourMatrix | llicle ) | urPointOn ( MeshInfo | Subd ) | f ( BlendSrf ( Obsolete ) ? | d | FilletSrf ) | l ( ow | uid ( S ( hape | liceManip ) | Textur
{ caseInsensitive : true ,
token : 'keyword.control.mel' ,
regex : '\\b(if|in|else|for|while|break|continue|case|default|do|switch|return|switch|case|source|catch|alias)\\b' } ,
{ token : 'keyword.other.mel' , regex : '\\b(global)\\b' } ,
{ caseInsensitive : true ,
token : 'constant.language.mel' ,
regex : '\\b(null|undefined)\\b' } ,
{ token : 'constant.numeric.mel' ,
regex : '\\b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\\.?[0-9]*)|(\\.[0-9]+))((e|E)(\\+|-)?[0-9]+)?)(L|l|UL|ul|u|U|F|f)?\\b' } ,
{ token : 'punctuation.definition.string.begin.mel' ,
2013-12-30 15:00:16 +00:00
regex : '"' ,
2023-01-16 22:26:34 +00:00
push : [ { token : 'constant.character.escape.mel' , regex : '\\\\.' } ,
{ token : 'punctuation.definition.string.end.mel' ,
regex : '"' ,
next : 'pop' } ,
{ defaultToken : 'string.quoted.double.mel' } ] } ,
{ token : [ 'variable.other.mel' , 'punctuation.definition.variable.mel' ] ,
regex : '(\\$)([a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*?\\b)' } ,
{ token : 'punctuation.definition.string.begin.mel' ,
2013-12-30 15:00:16 +00:00
regex : '\'' ,
2023-01-16 22:26:34 +00:00
push : [ { token : 'constant.character.escape.mel' , regex : '\\\\.' } ,
{ token : 'punctuation.definition.string.end.mel' ,
regex : '\'' ,
next : 'pop' } ,
{ defaultToken : 'string.quoted.single.mel' } ] } ,
{ token : 'constant.language.mel' ,
regex : '\\b(false|true|yes|no|on|off)\\b' } ,
{ token : 'punctuation.definition.comment.mel' ,
regex : '/\\*' ,
push : [ { token : 'punctuation.definition.comment.mel' ,
regex : '\\*/' ,
next : 'pop' } ,
{ defaultToken : 'comment.block.mel' } ] } ,
{ token : [ 'comment.line.double-slash.mel' , 'punctuation.definition.comment.mel' ] ,
regex : '(//)(.*$\\n?)' } ,
{ caseInsensitive : true ,
token : 'keyword.operator.mel' ,
regex : '\\b(instanceof)\\b' } ,
{ token : 'keyword.operator.symbolic.mel' ,
regex : '[-\\!\\%\\&\\*\\+\\=\\/\\?\\:]' } ,
{ token : [ 'meta.preprocessor.mel' , 'punctuation.definition.preprocessor.mel' ] ,
regex : '(^[ \\t]*)((?:#)[a-zA-Z]+)' } ,
{ token : [ 'meta.function.mel' , 'keyword.other.mel' , 'storage.type.mel' , 'entity.name.function.mel' , 'punctuation.section.function.mel' ] ,
regex : '(global\\s*)?(proc\\s*)(\\w+\\s*\\[?\\]?\\s+|\\s+)([A-Za-z_][A-Za-z0-9_\\.]*)(\\s*\\()' ,
push : [ { include : '$self' } ,
{ token : 'punctuation.section.function.mel' ,
regex : '\\)' ,
next : 'pop' } ,
{ defaultToken : 'meta.function.mel' } ] }
] } ;
2013-12-30 15:00:16 +00:00
this . normalizeRules ( ) ;
} ;
oop . inherits ( MELHighlightRules , TextHighlightRules ) ;
exports . MELHighlightRules = MELHighlightRules ;
2023-01-16 22:26:34 +00:00
} ) ;
2013-12-30 15:00:16 +00:00
2023-01-16 22:26:34 +00:00
ace . define ( "ace/mode/folding/cstyle" , [ "require" , "exports" , "module" , "ace/lib/oop" , "ace/range" , "ace/mode/folding/fold_mode" ] , function ( require , exports , module ) { "use strict" ;
2013-12-30 15:00:16 +00:00
var oop = require ( "../../lib/oop" ) ;
var Range = require ( "../../range" ) . Range ;
var BaseFoldMode = require ( "./fold_mode" ) . FoldMode ;
2023-01-16 22:26:34 +00:00
var FoldMode = exports . FoldMode = function ( commentRegex ) {
2013-12-30 15:00:16 +00:00
if ( commentRegex ) {
2023-01-16 22:26:34 +00:00
this . foldingStartMarker = new RegExp ( this . foldingStartMarker . source . replace ( /\|[^|]*?$/ , "|" + commentRegex . start ) ) ;
this . foldingStopMarker = new RegExp ( this . foldingStopMarker . source . replace ( /\|[^|]*?$/ , "|" + commentRegex . end ) ) ;
2013-12-30 15:00:16 +00:00
}
} ;
oop . inherits ( FoldMode , BaseFoldMode ) ;
2023-01-16 22:26:34 +00:00
( function ( ) {
2020-04-14 12:14:48 +00:00
this . foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/ ;
this . foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/ ;
2023-01-16 22:26:34 +00:00
this . singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/ ;
2014-07-08 20:15:22 +00:00
this . tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/ ;
2015-11-19 16:37:40 +00:00
this . startRegionRe = /^\s*(\/\*|\/\/)#?region\b/ ;
2014-07-08 20:15:22 +00:00
this . _getFoldWidgetBase = this . getFoldWidget ;
2023-01-16 22:26:34 +00:00
this . getFoldWidget = function ( session , foldStyle , row ) {
2014-07-08 20:15:22 +00:00
var line = session . getLine ( row ) ;
if ( this . singleLineBlockCommentRe . test ( line ) ) {
if ( ! this . startRegionRe . test ( line ) && ! this . tripleStarBlockCommentRe . test ( line ) )
return "" ;
}
var fw = this . _getFoldWidgetBase ( session , foldStyle , row ) ;
if ( ! fw && this . startRegionRe . test ( line ) )
return "start" ; // lineCommentRegionStart
return fw ;
} ;
2023-01-16 22:26:34 +00:00
this . getFoldWidgetRange = function ( session , foldStyle , row , forceMultiline ) {
2013-12-30 15:00:16 +00:00
var line = session . getLine ( row ) ;
2014-07-08 20:15:22 +00:00
if ( this . startRegionRe . test ( line ) )
return this . getCommentRegionBlock ( session , line , row ) ;
2013-12-30 15:00:16 +00:00
var match = line . match ( this . foldingStartMarker ) ;
if ( match ) {
var i = match . index ;
if ( match [ 1 ] )
return this . openingBracketBlock ( session , match [ 1 ] , row , i ) ;
var range = session . getCommentFoldRange ( row , i + match [ 0 ] . length , 1 ) ;
if ( range && ! range . isMultiLine ( ) ) {
if ( forceMultiline ) {
range = this . getSectionRange ( session , row ) ;
2023-01-16 22:26:34 +00:00
}
else if ( foldStyle != "all" )
2013-12-30 15:00:16 +00:00
range = null ;
}
return range ;
}
if ( foldStyle === "markbegin" )
return ;
var match = line . match ( this . foldingStopMarker ) ;
if ( match ) {
var i = match . index + match [ 0 ] . length ;
if ( match [ 1 ] )
return this . closingBracketBlock ( session , match [ 1 ] , row , i ) ;
return session . getCommentFoldRange ( row , i , - 1 ) ;
}
} ;
2023-01-16 22:26:34 +00:00
this . getSectionRange = function ( session , row ) {
2013-12-30 15:00:16 +00:00
var line = session . getLine ( row ) ;
var startIndent = line . search ( /\S/ ) ;
var startRow = row ;
var startColumn = line . length ;
row = row + 1 ;
var endRow = row ;
var maxRow = session . getLength ( ) ;
while ( ++ row < maxRow ) {
line = session . getLine ( row ) ;
var indent = line . search ( /\S/ ) ;
if ( indent === - 1 )
continue ;
2023-01-16 22:26:34 +00:00
if ( startIndent > indent )
2013-12-30 15:00:16 +00:00
break ;
var subRange = this . getFoldWidgetRange ( session , "all" , row ) ;
if ( subRange ) {
if ( subRange . start . row <= startRow ) {
break ;
2023-01-16 22:26:34 +00:00
}
else if ( subRange . isMultiLine ( ) ) {
2013-12-30 15:00:16 +00:00
row = subRange . end . row ;
2023-01-16 22:26:34 +00:00
}
else if ( startIndent == indent ) {
2013-12-30 15:00:16 +00:00
break ;
}
}
endRow = row ;
}
return new Range ( startRow , startColumn , endRow , session . getLine ( endRow ) . length ) ;
} ;
2023-01-16 22:26:34 +00:00
this . getCommentRegionBlock = function ( session , line , row ) {
2014-07-08 20:15:22 +00:00
var startColumn = line . search ( /\s*$/ ) ;
var maxRow = session . getLength ( ) ;
var startRow = row ;
2015-11-19 16:37:40 +00:00
var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/ ;
2014-07-08 20:15:22 +00:00
var depth = 1 ;
while ( ++ row < maxRow ) {
line = session . getLine ( row ) ;
var m = re . exec ( line ) ;
2023-01-16 22:26:34 +00:00
if ( ! m )
continue ;
if ( m [ 1 ] )
depth -- ;
else
depth ++ ;
if ( ! depth )
break ;
2014-07-08 20:15:22 +00:00
}
var endRow = row ;
if ( endRow > startRow ) {
return new Range ( startRow , startColumn , endRow , line . length ) ;
}
} ;
2013-12-30 15:00:16 +00:00
} ) . call ( FoldMode . prototype ) ;
} ) ;
2014-07-08 20:15:22 +00:00
2023-01-16 22:26:34 +00:00
ace . define ( "ace/mode/mel" , [ "require" , "exports" , "module" , "ace/lib/oop" , "ace/mode/text" , "ace/mode/mel_highlight_rules" , "ace/mode/behaviour/cstyle" , "ace/mode/folding/cstyle" ] , function ( require , exports , module ) { "use strict" ;
2014-07-08 20:15:22 +00:00
var oop = require ( "../lib/oop" ) ;
var TextMode = require ( "./text" ) . Mode ;
var MELHighlightRules = require ( "./mel_highlight_rules" ) . MELHighlightRules ;
var CstyleBehaviour = require ( "./behaviour/cstyle" ) . CstyleBehaviour ;
var CStyleFoldMode = require ( "./folding/cstyle" ) . FoldMode ;
2023-01-16 22:26:34 +00:00
var Mode = function ( ) {
2014-07-08 20:15:22 +00:00
this . HighlightRules = MELHighlightRules ;
this . $behaviour = new CstyleBehaviour ( ) ;
this . foldingRules = new CStyleFoldMode ( ) ;
} ;
oop . inherits ( Mode , TextMode ) ;
2023-01-16 22:26:34 +00:00
( function ( ) {
2014-07-08 20:15:22 +00:00
this . lineCommentStart = "//" ;
2023-01-16 22:26:34 +00:00
this . blockComment = { start : "/*" , end : "*/" } ;
2014-07-08 20:15:22 +00:00
this . $id = "ace/mode/mel" ;
} ) . call ( Mode . prototype ) ;
exports . Mode = Mode ;
2020-04-14 12:14:48 +00:00
} ) ; ( function ( ) {
ace . require ( [ "ace/mode/mel" ] , function ( m ) {
if ( typeof module == "object" && typeof exports == "object" && module ) {
module . exports = m ;
}
} ) ;
} ) ( ) ;