def load_syntax():
 empty = dict()
 files = os.listdir(resources.SYNTAX_FILES)
 for f in files:
  if (not f.endswith('.json')):
   continue
  fname = os.path.join(resources.SYNTAX_FILES, f)
  structure = read_json(fname)
  if (structure == empty):
   continue
  name = os.path.splitext(f)[0]
  settings.SYNTAX[name] = structure
  for ext in structure.get('extension'):
   if (ext is not None):
    settings.EXTENSIONS[ext] = name

def load_syntax ( ) : empty = dict ( ) files = os . listdir ( resources . SYNTAX_FILES ) for f in files : if ( not f . endswith ( '.json' ) ) : continue fname = os . path . join ( resources . SYNTAX_FILES , f ) structure = read_json ( fname ) if ( structure == empty ) : continue name = os . path . splitext ( f ) [ 0 ] settings . SYNTAX [ name ] = structure for ext in structure . get ( 'extension' ) : if ( ext is not None ) : settings . EXTENSIONS [ ext ] = name
load all the syntax files .