bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#59435: 29.0.50; tree-sitter fails to fontify or indent simple functi


From: Po Lu
Subject: bug#59435: 29.0.50; tree-sitter fails to fontify or indent simple function
Date: Mon, 21 Nov 2022 14:09:43 +0800

c-ts-mode cannot fontify the following code:

ifsubmitbufl (tp)
{
  register      *kb1 = tp;
  extern         tbase, i_len;
  register       l = len;

again:
  
  highprio (); /* tbase is used by protoureg */
  iomap (&UBR, tbase += UBR_SIZ);
  UBR->addr_l = kb1;
  UBR->addr_m = kb1 >> 010;
  UBR->mode_l = 07777 &~ UBR_INST;
  UBR->mode_m = 0;
  UBR->long_l = l;
  UBR->long_m = l >> 010;

  iounmap ();
  tally_iostat (tbase);
  iospoke (UBR, P_LOCK);
  resetprio ();

  SWITCH (S_WAIT|S_HIGH|S_IMMED, 0700, again); /* this returns to
                                                  BR->senv[0], except
                                                  if CL_HI */
}

here, ifsubmitbufl, tbase, l and again are fontified as types.  They are
fontified correctly by CC Mode, as three identifiers and one label.

Trying to indent after "again:" results in text being indented to column
0.

In GNU Emacs 29.0.50 (build 3, x86_64-pc-linux-gnu) of 2022-11-21 built
 on trinity
Repository revision: c1a95056214d9bf18bc2c34e938205f1da916bba
Repository branch: feature/tree-sitter
Windowing system distributor 'The X.Org Foundation', version 11.0.12101099
System Description: Fedora Linux 37 (Workstation Edition)

Configured using:
 'configure --with-tree-sitter --with-x-toolkit=no --without-cairo
 --with-dumping=unexec'

Configured features:
ACL DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG JSON LCMS2
LIBSELINUX LIBSYSTEMD LIBXML2 MODULES NOTIFY INOTIFY OLDXMENU PNG RSVG
SECCOMP SOUND SQLITE3 THREADS TIFF TREE_SITTER UNEXEC WEBP X11 XDBE XFT
XIM XINPUT2 XPM ZLIB




reply via email to

[Prev in Thread] Current Thread [Next in Thread]