private static void updateChecksum(Checksum checksum, int value) { checksum.Update((value) & 0xFF); checksum.Update((int)((uint)value >> 8) & 0xFF); checksum.Update((int)((uint)value >> 16) & 0xFF); checksum.Update((int)((uint)value >> 24) & 0xFF); }
private static void updateChecksum(Checksum checksum, IToken token) { if (token == null) { checksum.Update(0); return; } updateChecksum(checksum, token.StartIndex); updateChecksum(checksum, token.StopIndex); updateChecksum(checksum, token.Line); updateChecksum(checksum, token.Column); updateChecksum(checksum, token.Type); updateChecksum(checksum, token.Channel); }
public void VisitTerminal(ITerminalNode node) { checksum.Update(VISIT_TERMINAL); updateChecksum(checksum, node.Symbol); }